CREATE TABLE IF NOT EXISTS room_permission_overwrite (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    room UUID NOT NULL REFERENCES room(id),
    target_type TEXT NOT NULL,
    target_id UUID NOT NULL,
    allow_permissions TEXT NOT NULL,
    deny_permissions TEXT NOT NULL,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
