-- Add migration script here
CREATE TABLE IF NOT EXISTS gate_codes
(
    code VARCHAR PRIMARY KEY,
    handle VARCHAR NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

-- Index on created_at for efficient cleanup of expired codes
CREATE INDEX IF NOT EXISTS idx_gate_codes_created_at ON gate_codes(created_at);
