diff options
Diffstat (limited to 'server/migrations/1_init_up.sql')
| -rw-r--r-- | server/migrations/1_init_up.sql | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/migrations/1_init_up.sql b/server/migrations/1_init_up.sql index 7edb398..8400f8d 100644 --- a/server/migrations/1_init_up.sql +++ b/server/migrations/1_init_up.sql | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | BEGIN; | 1 | CREATE TABLE migration ( |
| 2 | at_most_one_row INTEGER UNIQUE DEFAULT 1, | ||
| 3 | version INTEGER NOT NULL, | ||
| 4 | -- This table should have at most one row. | ||
| 5 | CHECK (at_most_one_row = 1) | ||
| 6 | ) STRICT; | ||
| 2 | 7 | ||
| 3 | CREATE TABLE migration (version); | 8 | INSERT INTO migration (version) VALUES (0); |
| 4 | |||
| 5 | INSERT INTO migration VALUES (1); | ||
| 6 | |||
| 7 | COMMIT; | ||