-- Add paid-plan expiry + optional scheduled downgrade fields.
ALTER TABLE "shops"
  ADD COLUMN "planExpiresAt" TIMESTAMP(3),
  ADD COLUMN "scheduledPlanCode" TEXT,
  ADD COLUMN "scheduledPlanAt" TIMESTAMP(3);

-- Helpful indexes for cron + UI queries.
CREATE INDEX "shops_planExpiresAt_idx" ON "shops" ("planExpiresAt");
CREATE INDEX "shops_scheduledPlanAt_idx" ON "shops" ("scheduledPlanAt");

