Run SQLx migrations on startup

This commit is contained in:
2026-01-16 10:39:51 +01:00
parent fc2c8b3452
commit 26b23948ec
7 changed files with 99 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
-- Create languages table
CREATE TABLE IF NOT EXISTS languages (
id SERIAL PRIMARY KEY,
label VARCHAR(16) NOT NULL,
code VARCHAR(4) NOT NULL UNIQUE
);
-- Create unique index on code (if not exists from UNIQUE constraint)
CREATE UNIQUE INDEX IF NOT EXISTS languages_code_key ON languages(code);