-- +goose Up
ALTER TABLE tasks
    ADD COLUMN IF NOT EXISTS external_provider text NULL,
    ADD COLUMN IF NOT EXISTS external_id text NULL,
    ADD COLUMN IF NOT EXISTS external_url text NULL,
    ADD COLUMN IF NOT EXISTS external_metadata jsonb NOT NULL DEFAULT '{}';

-- +goose Down
ALTER TABLE tasks
    DROP COLUMN IF EXISTS external_metadata,
    DROP COLUMN IF EXISTS external_url,
    DROP COLUMN IF EXISTS external_id,
    DROP COLUMN IF EXISTS external_provider;
