From 57564a8ab0562555ef76e2281d1397c5d644bd4f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 7 Sep 2014 09:10:23 +0200 Subject: [PATCH] Cleanup shard table --- code/web/private_php/setup/sql/nel_00003.sql | 6 ++++++ code/web/public_php/setup/database.php | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 code/web/private_php/setup/sql/nel_00003.sql diff --git a/code/web/private_php/setup/sql/nel_00003.sql b/code/web/private_php/setup/sql/nel_00003.sql new file mode 100644 index 000000000..c3ec6c033 --- /dev/null +++ b/code/web/private_php/setup/sql/nel_00003.sql @@ -0,0 +1,6 @@ +ALTER TABLE `shard` DROP `prim` ; +ALTER TABLE `shard` ADD PRIMARY KEY ( `ShardId` ) ; +ALTER TABLE `shard` DROP `PatchURL` ; +ALTER TABLE `shard` DROP `DynPatchURL` ; +ALTER TABLE `shard` DROP `ClientApplication` ; + diff --git a/code/web/public_php/setup/database.php b/code/web/public_php/setup/database.php index 37e5ce50b..16ab10dcd 100644 --- a/code/web/public_php/setup/database.php +++ b/code/web/public_php/setup/database.php @@ -61,6 +61,10 @@ function upgrade_service_databases($continue_r) { $continue = update_database_structure($continue, $con, "nel_00002.sql"); $continue = set_db_version($continue, "shard", 2); } + if ($continue && get_db_version("shard") < 3) { + $continue = update_database_structure($continue, $con, "nel_00003.sql"); + $continue = set_db_version($continue, "shard", 3); + } disconnect_database($con, "shard"); $con = null;