update to wal mode
All checks were successful
backend-action / build-image (push) Successful in 58s

This commit is contained in:
2024-05-18 09:40:43 +07:00
parent 99f9531d32
commit 0f6ec77dc0
3 changed files with 8 additions and 1 deletions

View File

@@ -24,3 +24,6 @@ tasks:
- node -r @swc-node/register src/app.ts
env:
NODE_ENV: production
update-server:
cmds:
- ssh -t sorvor-p "docker compose pull && docker compose up -d"

View File

@@ -21,7 +21,10 @@ export const Groups = [
"กลุ่มอื่นๆ",
];
export const Opinions: { name: string; choicemode: "3Choice" | "4Choice" }[] = [
export const Opinions: {
name: string;
choicemode: "3Choice" | "4Choice" | "5Choice";
}[] = [
{ name: "สว. มีอำนาจโหวตเลือกนายกรัฐมนตรี", choicemode: "3Choice" },
{ name: "แก้ไขรัฐธรรมนูญ 2560", choicemode: "3Choice" },
{ name: "เขียนรัฐธรรมนูญใหม่ “ทั้งฉบับ”", choicemode: "3Choice" },

View File

@@ -4,5 +4,6 @@ import Database from "better-sqlite3";
import * as schema from "./schema";
const sqlite = new Database("sqlite.db");
sqlite.pragma("journal_mode = WAL");
export const db = drizzle(sqlite, { schema });
migrate(db, { migrationsFolder: "drizzle" });