From 2871dd2926c3e67c5c4a6a304c9e1e42a333038d 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;