-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathupgrade.php
40 lines (35 loc) · 926 Bytes
/
upgrade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* @package Topic Solved
* @version 1.2
* @author Diego Andrés <diegoandres_cortes@outlook.com>
* @copyright Copyright (c) 2025, SMF Tricks
*/
global $smcFunc;
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
elseif (!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');
db_extend('packages');
// Add a column for choosing which status to use for auto-moving.
$smcFunc['db_add_column'](
'{db_prefix}boards',
[
'name' => 'solve_automove',
'type' => 'tinyint',
'default' => 0,
'unsigned' => true,
'not_null' => true,
]
);
// Add a column for the destination board when auto-moving
$smcFunc['db_add_column'](
'{db_prefix}boards',
[
'name' => 'solved_destination',
'type' => 'smallint',
'default' => 0,
'unsigned' => true,
'not_null' => true,
]
);