CREATE TABLE IF NOT EXISTS bazzar_pos.pos_cart_free_item_selections (
    id BIGSERIAL PRIMARY KEY,
    actor_id BIGINT NOT NULL REFERENCES bazzar_pos.users(id) ON DELETE CASCADE,
    rule_id BIGINT NOT NULL REFERENCES bazzar_pos.automation_free_item_rules(id) ON DELETE CASCADE,
    selected_free_product_id BIGINT NOT NULL REFERENCES bazzar_pos.products(id),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    UNIQUE (actor_id, rule_id)
);
