-- AlterTable
ALTER TABLE "public"."cf_api_keys" ADD COLUMN     "organization_id" TEXT;

-- AlterTable
ALTER TABLE "public"."optimization_events" ADD COLUMN     "staging_storage_type" TEXT;

-- AlterTable
ALTER TABLE "public"."organizations" ADD COLUMN     "privacy_mode" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN     "subscription" BOOLEAN NOT NULL DEFAULT false;

-- AlterTable
ALTER TABLE "public"."users" ADD COLUMN     "privacy_mode" BOOLEAN NOT NULL DEFAULT false;

-- CreateIndex
CREATE INDEX "cf_api_keys_organization_id_idx" ON "public"."cf_api_keys"("organization_id");

-- AddForeignKey
ALTER TABLE "public"."cf_api_keys" ADD CONSTRAINT "cf_api_keys_organization_id_fkey" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("id") ON DELETE SET NULL ON UPDATE CASCADE;
