aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/migrations/2021-12-18-130837_bots
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-02-27 22:58:11 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-02-27 22:58:11 +0100
commitda3d7ed02d995794d5c8aab2563e4d0f53d33416 (patch)
tree4112dbe9611bc18ec9b5c4bb6b7371e6cec2d2d4 /planetwars-server/migrations/2021-12-18-130837_bots
parentedb3ead976cd51ab6d627fe6b36bb9f0be8a17d3 (diff)
downloadplanetwars.dev-da3d7ed02d995794d5c8aab2563e4d0f53d33416.tar.xz
planetwars.dev-da3d7ed02d995794d5c8aab2563e4d0f53d33416.zip
create code bundle indices
Diffstat (limited to 'planetwars-server/migrations/2021-12-18-130837_bots')
-rw-r--r--planetwars-server/migrations/2021-12-18-130837_bots/down.sql4
-rw-r--r--planetwars-server/migrations/2021-12-18-130837_bots/up.sql5
2 files changed, 7 insertions, 2 deletions
diff --git a/planetwars-server/migrations/2021-12-18-130837_bots/down.sql b/planetwars-server/migrations/2021-12-18-130837_bots/down.sql
index 3d14604..a1309ff 100644
--- a/planetwars-server/migrations/2021-12-18-130837_bots/down.sql
+++ b/planetwars-server/migrations/2021-12-18-130837_bots/down.sql
@@ -1,3 +1,5 @@
+DROP INDEX code_bundles_bot_id_index;
+DROP INDEX code_bundles_created_at_index;
+
DROP TABLE code_bundles;
-DROP INDEX bots_index;
DROP TABLE bots; \ No newline at end of file
diff --git a/planetwars-server/migrations/2021-12-18-130837_bots/up.sql b/planetwars-server/migrations/2021-12-18-130837_bots/up.sql
index b158940..a1f3f59 100644
--- a/planetwars-server/migrations/2021-12-18-130837_bots/up.sql
+++ b/planetwars-server/migrations/2021-12-18-130837_bots/up.sql
@@ -9,4 +9,7 @@ CREATE TABLE code_bundles (
bot_id integer REFERENCES bots(id),
path text NOT NULL,
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
-); \ No newline at end of file
+);
+
+CREATE INDEX code_bundles_bot_id_index ON code_bundles(bot_id);
+CREATE INDEX code_bundles_created_at_index ON code_bundles(created_at); \ No newline at end of file