Vadim A. Misbakh-Soloviov commited on 2013-10-21 10:58:31
Showing 1 changed files, with 17 additions and 17 deletions.
Despite of width you specify, SMALLINT will always be SMALLINT and use it's range. But using SMALLINT(255) breaks mod installation on PostgreSQL powered forums
... | ... |
@@ -14,26 +14,26 @@ global $db_prefix, $modSettings, $func, $smcFunc; |
14 | 14 |
|
15 | 15 |
// Fields to add |
16 | 16 |
$new_fields = array( |
17 |
- 'is_ipv6' => array('name'=> 'is_ipv6', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
18 |
- 'ip_low5' => array('name'=> 'ip_low5', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
19 |
- 'ip_high5' => array('name'=> 'ip_high5', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
20 |
- 'ip_low6' => array('name'=> 'ip_low6', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
21 |
- 'ip_high6' => array('name'=> 'ip_high6', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
22 |
- 'ip_low7' => array('name'=> 'ip_low7', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
23 |
- 'ip_high7' => array('name'=> 'ip_high7', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
24 |
- 'ip_low8' => array('name'=> 'ip_low8', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
25 |
- 'ip_high8' => array('name'=> 'ip_high8', 'type'=>'SMALLINT(255)', 'unsigned' => true, 'default' => 0), |
|
17 |
+ 'is_ipv6' => array('name'=> 'is_ipv6', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
18 |
+ 'ip_low5' => array('name'=> 'ip_low5', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
19 |
+ 'ip_high5' => array('name'=> 'ip_high5', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
20 |
+ 'ip_low6' => array('name'=> 'ip_low6', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
21 |
+ 'ip_high6' => array('name'=> 'ip_high6', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
22 |
+ 'ip_low7' => array('name'=> 'ip_low7', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
23 |
+ 'ip_high7' => array('name'=> 'ip_high7', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
24 |
+ 'ip_low8' => array('name'=> 'ip_low8', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
25 |
+ 'ip_high8' => array('name'=> 'ip_high8', 'type'=>'SMALLINT', 'unsigned' => true, 'default' => 0), |
|
26 | 26 |
); |
27 | 27 |
|
28 | 28 |
$changed_fields = array( |
29 |
- 'ip_low1' => array('name'=> 'ip_low1', 'type'=>'SMALLINT(255)'), |
|
30 |
- 'ip_high1' => array('name'=> 'ip_high1', 'type'=>'SMALLINT(255)'), |
|
31 |
- 'ip_low2' => array('name'=> 'ip_low2', 'type'=>'SMALLINT(255)'), |
|
32 |
- 'ip_high2' => array('name'=> 'ip_high2', 'type'=>'SMALLINT(255)'), |
|
33 |
- 'ip_low3' => array('name'=> 'ip_low3', 'type'=>'SMALLINT(255)'), |
|
34 |
- 'ip_high3' => array('name'=> 'ip_high3', 'type'=>'SMALLINT(255)'), |
|
35 |
- 'ip_low4' => array('name'=> 'ip_low4', 'type'=>'SMALLINT(255)'), |
|
36 |
- 'ip_high4' => array('name'=> 'ip_high4', 'type'=>'SMALLINT(255)'), |
|
29 |
+ 'ip_low1' => array('name'=> 'ip_low1', 'type'=>'SMALLINT'), |
|
30 |
+ 'ip_high1' => array('name'=> 'ip_high1', 'type'=>'SMALLINT'), |
|
31 |
+ 'ip_low2' => array('name'=> 'ip_low2', 'type'=>'SMALLINT'), |
|
32 |
+ 'ip_high2' => array('name'=> 'ip_high2', 'type'=>'SMALLINT'), |
|
33 |
+ 'ip_low3' => array('name'=> 'ip_low3', 'type'=>'SMALLINT'), |
|
34 |
+ 'ip_high3' => array('name'=> 'ip_high3', 'type'=>'SMALLINT'), |
|
35 |
+ 'ip_low4' => array('name'=> 'ip_low4', 'type'=>'SMALLINT'), |
|
36 |
+ 'ip_high4' => array('name'=> 'ip_high4', 'type'=>'SMALLINT'), |
|
37 | 37 |
); |
38 | 38 |
|
39 | 39 |
// Load up the board info, we will only add these once. |
40 | 40 |