CREATE TABLE IF NOT EXISTS persons (
    id SERIAL PRIMARY KEY,
    name TEXT NOT NULL,
    age INTEGER NOT NULL,
    phone_number TEXT NOT NULL,
    checked_in BOOLEAN NOT NULL DEFAULT FALSE,
    inside BOOLEAN NOT NULL DEFAULT FALSE
);

CREATE INDEX IF NOT EXISTS idx_persons_name_trgm ON persons USING GIN (name gin_trgm_ops);
CREATE INDEX IF NOT EXISTS idx_persons_phone_number ON persons (phone_number);
