fix item_id table
This commit is contained in:
parent
59d98647fb
commit
640f5306f5
3 changed files with 16 additions and 3 deletions
13
update.php
13
update.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1155 );
|
||||
define( 'UPDATE_VERSION' , 1156 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1351,3 +1351,14 @@ function update_1154() {
|
|||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
function update_1155() {
|
||||
$r1 = q("ALTER TABLE `item_id` DROP PRIMARY KEY");
|
||||
$r2 = q("ALTER TABLE `item_id` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
|
||||
$r3 = q("ALTER TABLE `item_id` ADD INDEX ( `iid` ) ");
|
||||
|
||||
if($r1 && $r2 && $r3)
|
||||
return UPDATE_SUCCESS;
|
||||
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue