mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 19:51:29 +00:00
[Database] Add Primary ID Keys to Tables (#2036)
This commit is contained in:
parent
2a5ddde78a
commit
25a19a13dc
@ -34,7 +34,7 @@
|
||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9176
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9177
|
||||
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9028
|
||||
|
||||
@ -430,6 +430,7 @@
|
||||
9174|2021_10_09_not_null_door_columns.sql|SELECT * FROM db_version WHERE version >= 9174|empty|
|
||||
9175|2022_01_02_expansion_default_value_all.sql|SHOW COLUMNS FROM `forage` LIKE 'min_expansion'|contains|unsigned
|
||||
9176|2022_01_10_checksum_verification.sql|SHOW COLUMNS FROM `account` LIKE 'checksum_crc1_eqgame'|empty|
|
||||
9177|2022_03_06_table_structure_changes.sql|SHOW COLUMNS FROM `pets` LIKE 'id'|empty|
|
||||
|
||||
# Upgrade conditions:
|
||||
# This won't be needed after this system is implemented, but it is used database that are not
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
ALTER TABLE `pets` DROP PRIMARY KEY;
|
||||
ALTER TABLE `pets` ADD `id` int(20) PRIMARY KEY NOT NULL AUTO_INCREMENT FIRST;
|
||||
CREATE UNIQUE INDEX `type_petpower` ON pets (type, petpower);
|
||||
|
||||
ALTER TABLE `horses` DROP PRIMARY KEY;
|
||||
ALTER TABLE `horses` ADD `id` int(20) PRIMARY KEY NOT NULL AUTO_INCREMENT FIRST;
|
||||
CREATE UNIQUE INDEX `filename` ON horses (filename);
|
||||
|
||||
ALTER TABLE books DROP INDEX `id`;
|
||||
ALTER TABLE `books` ADD `id` int(20) PRIMARY KEY NOT NULL AUTO_INCREMENT FIRST;
|
||||
CREATE UNIQUE INDEX `filename` ON books (name);
|
||||
Loading…
x
Reference in New Issue
Block a user