aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql')
-rw-r--r--planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql b/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql
new file mode 100644
index 0000000..89058fe
--- /dev/null
+++ b/planetwars-server/migrations/2022-07-04-200149_code_bundle_to_bot_version/down.sql
@@ -0,0 +1,6 @@
+ALTER TABLE match_players RENAME COLUMN bot_version_id TO code_bundle_id;
+
+ALTER TABLE bot_versions DROP COLUMN container_digest;
+ALTER TABLE bot_versions RENAME COLUMN code_bundle_path TO path;
+ALTER TABLE bot_versions ALTER COLUMN path SET NOT NULL;
+ALTER TABLE bot_versions RENAME TO code_bundles;