diff options
author | GrailFinder <wohilas@gmail.com> | 2024-06-12 09:13:05 +0300 |
---|---|---|
committer | GrailFinder <wohilas@gmail.com> | 2024-06-12 09:13:05 +0300 |
commit | b300ad869f424cdd26bcfc78635a27656836ca96 (patch) | |
tree | fc675c3608269d367be2ec23fd689f030bfaebd2 /internal/database/migrations/001_init.up.sql | |
parent | 01f9a9f5d71450a0c80195058245fdebe88796bd (diff) |
Diffstat (limited to 'internal/database/migrations/001_init.up.sql')
-rw-r--r-- | internal/database/migrations/001_init.up.sql | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/database/migrations/001_init.up.sql b/internal/database/migrations/001_init.up.sql index f7e41c1..141a045 100644 --- a/internal/database/migrations/001_init.up.sql +++ b/internal/database/migrations/001_init.up.sql @@ -1,5 +1,5 @@ -BEGIN; -CREATE TABLE user_score ( +BEGIN TRANSACTION; +CREATE TABLE IF NOT EXISTS user_score ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT UNIQUE NOT NULL, password TEXT NOT NULL, @@ -8,7 +8,7 @@ CREATE TABLE user_score ( created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); -CREATE TABLE action ( +CREATE TABLE IF NOT EXISTS action( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, magnitude SMALLINT NOT NULL DEFAULT 1, |