-- ============================================================
-- iBilik Capital Database v2.5.3
-- Second Audit Accounting Hardening
-- Baseline: Database v2.5.2
-- No destructive schema changes.
-- ============================================================
SET NAMES utf8mb4;

-- Latest verified database currently has no reporting period.
-- Seed the current development month. Future periods are created in /accounting/periods.php.
INSERT IGNORE INTO reporting_periods
(period_code,start_date,end_date,status,closed_at,closed_by_user_id,closed_by_super_admin_id)
VALUES
('2026-08','2026-08-01','2026-08-31','OPEN',NULL,NULL,NULL);

SELECT id,period_code,start_date,end_date,status
FROM reporting_periods
ORDER BY start_date DESC,id DESC;

SELECT 'iBilik Capital Database v2.5.3 Second Audit Accounting Hardening completed.' AS migration_status;
