-- Migration: Add schema version tracking table
-- Date: 2026-05-15
-- Usage: psql -U accusys -d momentry -f migrate_add_schema_version.sql

CREATE TABLE IF NOT EXISTS schema_migrations (
    id SERIAL PRIMARY KEY,
    filename TEXT NOT NULL UNIQUE,
    checksum TEXT NOT NULL,
    applied_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    duration_ms INTEGER DEFAULT 0
);
