Refactor backend database connection, migration, seed

This commit is contained in:
2025-10-17 12:41:58 +02:00
parent 176032e54b
commit 560693633e
9 changed files with 163 additions and 99 deletions

View File

@@ -0,0 +1,14 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT NOT NULL UNIQUE,
password TEXT NOT NULL,
role INTEGER NOT NULL DEFAULT 2
)
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS users;
-- +goose StatementEnd