DROP INDEX "mobilepay_agreement_subscription_id_index";--> statement-breakpoint
ALTER TABLE "subscription" ALTER COLUMN "reference_id" SET NOT NULL;--> statement-breakpoint
UPDATE "subscription" SET "metadata" = '{}'::jsonb WHERE "metadata" IS NULL;--> statement-breakpoint
ALTER TABLE "subscription" ALTER COLUMN "metadata" SET DEFAULT '{}'::jsonb;--> statement-breakpoint
ALTER TABLE "subscription" ALTER COLUMN "metadata" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "subscription" ALTER COLUMN "cancel_at_period_end" SET NOT NULL;--> statement-breakpoint
CREATE INDEX "mobilepay_agreement_subscription_id_index" ON "mobilepay_agreement" USING btree ("subscription_id");