rathena/sql-files/upgrades/upgrade_20191222.sql
Jittapan Pluemsumran f2a1b6e784
Added primary key to tables that lack them & Dropped sstatus table (#4306)
* Added primary key to tables that lack them

* Dropped table sstatus

* Changed some primary keys and dropped no longer needed indexes

* Indent upgrade file with spaces
[ci skip]

* Fixed upgrade query on bonus_script table

* Renamed to current date

* Added missing table to engine conversion script

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2019-12-22 20:04:31 +07:00

37 lines
891 B
SQL

ALTER TABLE `bonus_script`
ADD PRIMARY KEY (`char_id`, `type`);
ALTER TABLE `buyingstore_items`
ADD PRIMARY KEY (`buyingstore_id`, `index`);
ALTER TABLE `charlog`
ADD PRIMARY KEY (`time`, `account_id`, `char_num`);
ALTER TABLE `friends`
DROP INDEX `char_id`,
ADD PRIMARY KEY (`char_id`, `friend_id`);
ALTER TABLE `interlog`
ADD COLUMN `id` INT NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (`id`),
ADD INDEX `time` (`time`);
ALTER TABLE `ipbanlist`
DROP INDEX `list`,
ADD PRIMARY KEY (`list`, `btime`);
ALTER TABLE `sc_data`
DROP INDEX `account_id`,
DROP INDEX `char_id`,
ADD PRIMARY KEY (`char_id`, `type`);
ALTER TABLE `skillcooldown`
DROP INDEX `account_id`,
DROP INDEX `char_id`,
ADD PRIMARY KEY (`char_id`, `skill`);
ALTER TABLE `vending_items`
ADD PRIMARY KEY (`vending_id`, `index`);
DROP TABLE `sstatus`;