2021-12-19 00:16:46 +01:00
|
|
|
CREATE TABLE bots (
|
|
|
|
id serial PRIMARY KEY,
|
2022-02-26 23:07:13 +01:00
|
|
|
owner_id integer REFERENCES users(id),
|
2021-12-19 00:16:46 +01:00
|
|
|
name text 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) NOT NULL,
|
|
|
|
path text NOT NULL,
|
|
|
|
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
|
|
);
|