CREATE TABLE IF NOT EXISTS foundry_state (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    is_admin BOOLEAN NOT NULL DEFAULT FALSE,
    is_setup BOOLEAN NOT NULL DEFAULT TRUE,
    state_type INTEGER NOT NULL,

    created_at DATETIME NOT NULL DEFAULT current_timestamp
);

CREATE TABLE IF NOT EXISTS options (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    state_id INTEGER UNIQUE,
    lang TEXT NOT NULL,
    FOREIGN KEY (state_id) REFERENCES foundry_state(id) ON DELETE CASCADE
);