Restore agent billing migration
This commit is contained in:
parent
a4bd6a1a6a
commit
dabe6b6268
2 changed files with 23 additions and 0 deletions
|
|
@ -97,3 +97,7 @@
|
||||||
- Navbar: combined admin actions (approvals/users/monitoring) under a single “Admin” dropdown menu.
|
- Navbar: combined admin actions (approvals/users/monitoring) under a single “Admin” dropdown menu.
|
||||||
- Pricing copy: treat listing prices as indicative “starting from” values and show starting-from line on browse cards + home latest carousel.
|
- Pricing copy: treat listing prices as indicative “starting from” values and show starting-from line on browse cards + home latest carousel.
|
||||||
- Site settings page added with a toggle to require login for listing contact details; contact info is now hidden from logged-out visitors.
|
- Site settings page added with a toggle to require login for listing contact details; contact info is now hidden from logged-out visitors.
|
||||||
|
|
||||||
|
## 2025-12-20 — Migration history repair
|
||||||
|
- Restored missing migration `20251212_agent_billing` (agent billing columns + listing billing settings table) so Prisma history matches the DB.
|
||||||
|
- Reconciled test DB migration history: aligned checksum for `20251212_agent_billing` and marked `20260310_site_settings` and `20260311_billing_preferences` as applied to stop Prisma errors and surface listings again.
|
||||||
|
|
|
||||||
19
prisma/migrations/20251212_agent_billing/migration.sql
Normal file
19
prisma/migrations/20251212_agent_billing/migration.sql
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
-- Agent billing preferences and per-listing overrides (legacy)
|
||||||
|
|
||||||
|
ALTER TABLE "User"
|
||||||
|
ADD COLUMN "agentBillingEnabled" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
|
ADD COLUMN "agentBankAccount" TEXT,
|
||||||
|
ADD COLUMN "agentVatBreakdownRequired" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
|
ADD COLUMN "agentUseListingOverrides" BOOLEAN NOT NULL DEFAULT FALSE;
|
||||||
|
|
||||||
|
CREATE TABLE "ListingBillingSettings" (
|
||||||
|
"id" TEXT NOT NULL,
|
||||||
|
"listingId" TEXT NOT NULL,
|
||||||
|
"bankAccount" TEXT,
|
||||||
|
"vatBreakdownRequired" BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
CONSTRAINT "ListingBillingSettings_pkey" PRIMARY KEY ("id"),
|
||||||
|
CONSTRAINT "ListingBillingSettings_listingId_key" UNIQUE ("listingId"),
|
||||||
|
CONSTRAINT "ListingBillingSettings_listingId_fkey" FOREIGN KEY ("listingId") REFERENCES "Listing"("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||||
|
);
|
||||||
Loading…
Add table
Reference in a new issue