-- +goose Up
-- Add reminders_disabled field to quotes table
ALTER TABLE quotes 
    ADD COLUMN reminders_disabled BOOLEAN DEFAULT FALSE AFTER valid_until,
    ADD COLUMN reminders_disabled_at DATETIME DEFAULT NULL AFTER reminders_disabled,
    ADD COLUMN reminders_disabled_by VARCHAR(100) DEFAULT NULL AFTER reminders_disabled_at;

-- +goose StatementBegin
CREATE INDEX idx_reminders_disabled ON quotes(reminders_disabled);
-- +goose StatementEnd

-- +goose Down
-- Remove index
-- +goose StatementBegin
DROP INDEX idx_reminders_disabled ON quotes;
-- +goose StatementEnd

-- Remove columns from quotes
ALTER TABLE quotes
    DROP COLUMN reminders_disabled_by,
    DROP COLUMN reminders_disabled_at,
    DROP COLUMN reminders_disabled;
