CREATE TABLE "ekklesia_core_platform_owner_bootstrap" ( "id" text PRIMARY KEY NOT NULL, "consumed_at" timestamp with time zone DEFAULT now() NOT NULL, "consumed_for_user_id" text, CONSTRAINT "ekklesia_core_platform_owner_bootstrap_singleton_check" CHECK ("ekklesia_core_platform_owner_bootstrap"."id" = 'singleton') ); --> statement-breakpoint ALTER TABLE "ekklesia_core_authorization_audit" DROP CONSTRAINT "ekklesia_core_authorization_audit_subject_user_id_ekklesia_core_user_id_fk"; --> statement-breakpoint INSERT INTO "ekklesia_core_platform_owner_bootstrap" ("id") SELECT 'singleton' WHERE EXISTS (SELECT 1 FROM "ekklesia_core_platform_owner") ON CONFLICT ("id") DO NOTHING;