-- 会計年度ロックテーブルの作成
CREATE TABLE IF NOT EXISTS fiscal_year_locks (
    fiscal_year INTEGER PRIMARY KEY,
    is_locked BOOLEAN DEFAULT false,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- デフォルト行を挿入（2024年～2026年）
DELETE FROM fiscal_year_locks;
INSERT INTO fiscal_year_locks (fiscal_year, is_locked) VALUES
    (2024, false),
    (2025, false),
    (2026, false);

COMMIT;
