-- Remove unused sync retry settings and reset existing settings row to new defaults
ALTER TABLE "platform_meeting_attendance"."outlook_sync_settings"
  DROP COLUMN IF EXISTS "max_retry",
  DROP COLUMN IF EXISTS "retry_backoff_ms";

ALTER TABLE "platform_meeting_attendance"."outlook_sync_settings"
  ALTER COLUMN "reconcile_cron" SET DEFAULT '*/10 * * * *',
  ALTER COLUMN "delta_batch_size" SET DEFAULT 100,
  ALTER COLUMN "lookahead_days" SET DEFAULT 180,
  ALTER COLUMN "lookback_days" SET DEFAULT 7,
  ALTER COLUMN "renew_before_minutes" SET DEFAULT 1440;

UPDATE "platform_meeting_attendance"."outlook_sync_settings"
SET
  "reconcile_cron" = '*/10 * * * *',
  "delta_batch_size" = 100,
  "lookahead_days" = 180,
  "lookback_days" = 7,
  "renew_before_minutes" = 1440,
  "updated_at" = NOW();
