aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/migrations')
-rw-r--r--planetwars-server/migrations/2021-12-18-130837_bots/up.sql4
1 files changed, 1 insertions, 3 deletions
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 a23fbf7..b158940 100644
--- a/planetwars-server/migrations/2021-12-18-130837_bots/up.sql
+++ b/planetwars-server/migrations/2021-12-18-130837_bots/up.sql
@@ -1,11 +1,9 @@
CREATE TABLE bots (
id serial PRIMARY KEY,
owner_id integer REFERENCES users(id),
- name text NOT NULL
+ name text UNIQUE NOT NULL
);
-CREATE UNIQUE INDEX bots_index ON bots(owner_id, name);
-
CREATE TABLE code_bundles (
id serial PRIMARY KEY,
bot_id integer REFERENCES bots(id),