Files
njts-accounting-core/backend/sql/create_fiscal_year_locks.sql
2026-02-21 10:51:25 +09:00

17 lines
487 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 会計年度ロックテーブルの作成
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;