feat: Add flatrate billing model for editorial accounts

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 03:27:10 +02:00
1 parent 699580a6a0
commit 0b1ffdfdfc
39 files changed
+4900 -57

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
CREATE TABLE "lightbox_items" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"editorial_account_id" uuid NOT NULL,
"asset_id" text NOT NULL,
"added_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "lightbox_items" ADD CONSTRAINT "lightbox_items_editorial_account_id_editorial_accounts_id_fk" FOREIGN KEY ("editorial_account_id") REFERENCES "public"."editorial_accounts"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "lightbox_items_editorial_asset_idx" ON "lightbox_items" USING btree ("editorial_account_id","asset_id");
+4
View File
@@ -0,0 +1,4 @@
ALTER TABLE "billing_reports" ADD COLUMN "flatrate_cents_snapshot" integer;--> statement-breakpoint
ALTER TABLE "editorial_accounts" ADD COLUMN "flatrate_active" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "editorial_accounts" ADD COLUMN "flatrate_price_cents" integer;--> statement-breakpoint
ALTER TABLE "editorial_accounts" ADD COLUMN "flatrate_asset_limit" integer;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+14
View File
@@ -50,6 +50,20 @@
"when": 1786410282719,
"tag": "0006_chubby_screwball",
"breakpoints": true
},
{
"idx": 7,
"version": "7",
"when": 1786410724623,
"tag": "0007_amused_franklin_storm",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1786411419497,
"tag": "0008_overjoyed_wrecking_crew",
"breakpoints": true
}
]
}