summaryrefslogtreecommitdiff
path: root/internal/database/migrations/001_init.up.sql
diff options
context:
space:
mode:
Diffstat (limited to 'internal/database/migrations/001_init.up.sql')
-rw-r--r--internal/database/migrations/001_init.up.sql6
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,