From b300ad869f424cdd26bcfc78635a27656836ca96 Mon Sep 17 00:00:00 2001
From: GrailFinder <wohilas@gmail.com>
Date: Wed, 12 Jun 2024 09:13:05 +0300
Subject: Feat: add cron and defaults table

---
 internal/database/migrations/001_init.up.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'internal/database/migrations/001_init.up.sql')

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,
-- 
cgit v1.2.3

