-- Migration tracking table -- This table keeps track of which migrations have been applied CREATE TABLE IF NOT EXISTS schema_migrations ( id SERIAL PRIMARY KEY, filename VARCHAR(255) UNIQUE NOT NULL, applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); -- Create index for faster lookups CREATE INDEX IF NOT EXISTS idx_schema_migrations_filename ON schema_migrations(filename);