diff options
Diffstat (limited to 'migrations')
-rw-r--r-- | migrations/0002-state.sql | 5 | ||||
-rw-r--r-- | migrations/0003-unique-state-key.sql | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/migrations/0002-state.sql b/migrations/0002-state.sql new file mode 100644 index 0000000..2465d30 --- /dev/null +++ b/migrations/0002-state.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS bot_state ( + id SERIAL PRIMARY KEY, + setting TEXT NOT NULL, + value TEXT NOT NULL +);
\ No newline at end of file diff --git a/migrations/0003-unique-state-key.sql b/migrations/0003-unique-state-key.sql new file mode 100644 index 0000000..1d19219 --- /dev/null +++ b/migrations/0003-unique-state-key.sql @@ -0,0 +1,2 @@ +ALTER TABLE bot_state DROP CONSTRAINT IF EXISTS setting_unique; +ALTER TABLE bot_state ADD CONSTRAINT setting_unique UNIQUE (setting);
\ No newline at end of file |