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 21:47:17 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-02-27 21:47:29 +0100
commitda7164317681aeca442ccef6ed0a74ad1952f0bf (patch)
tree5e7b3a7b123c19d6b803177d0aa2a4b71026c204 /planetwars-server/migrations/2021-12-18-130837_bots
parent22a8f3d619e8ef89eeb9a60ab0a27aed01aa93f7 (diff)
downloadplanetwars.dev-da7164317681aeca442ccef6ed0a74ad1952f0bf.tar.xz
planetwars.dev-da7164317681aeca442ccef6ed0a74ad1952f0bf.zip
seed simplebot on server startup
Diffstat (limited to 'planetwars-server/migrations/2021-12-18-130837_bots')
-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),