FUCK 2020.04.07 安装指令备份

因为老用户基本都升级,新用户安装时已经使用新结构,因此删掉了install.php,在此备份一下。

<?php //assbbs.com //【FUCK】2020.04.05 //【改变结构】fuck_file

!defined('DEBUG') AND exit('Forbidden');

db_exec('ALTER TABLE `'.$db->tablepre.'fuck_file` DROP `name`;');

db_exec('ALTER TABLE `'.$db->tablepre.'fuck_file` ADD `mode` TINYINT(1) unsigned NOT NULL AFTER `zone`;');

db_exec('ALTER TABLE `'.$db->tablepre.'fuck_file` MODIFY COLUMN `type` VARCHAR(10) COLLATE utf8_unicode_ci NOT NULL;');

db_exec('ALTER TABLE `'.$db->tablepre.'fuck_file` DROP INDEX `user_time`, ADD UNIQUE `user_mode_time` (`user`,`mode`,`time`) USING BTREE;');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `mode`=1 WHERE `mode`=0;');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `type`="gif" WHERE `type`="101";');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `type`="jpg" WHERE `type`="102";');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `type`="png" WHERE `type`="103";');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `type`="bmp" WHERE `type`="106";');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `type`="ico" WHERE `type`="117";');

db_exec('UPDATE `'.$db->tablepre.'fuck_file` SET `type`="webp" WHERE `type`="118";');

plugin_lock_end();

?>
C
1