Feat: UI Upgrade Flow (#1750)

* refactor: hook

* feat: add ui version to the tenant

* feat: add ui version to the tenant

* chore: bunch of generated stuff

* feat: return ui ver from db

* revert: flags change

* feat: wire up tenant update

* fix: type

* feat: upgrade / downgrade UI

* chore: tons more generated stuff 😬

* fix: some redirect logic

* fix: copy

* fix: non-required

* chore: gen

* fix: transformers

* fix: rm from v0 tenants

* fix: redirect
This commit is contained in:
Matt Kaye
2025-05-20 16:28:50 -04:00
committed by GitHub
parent a7cda3f073
commit 495fb756b5
325 changed files with 1135 additions and 779 deletions

View File

@@ -591,6 +591,11 @@ CREATE TYPE "TenantMajorEngineVersion" AS ENUM (
'V1'
);
CREATE TYPE "TenantMajorUIVersion" AS ENUM (
'V0',
'V1'
);
-- CreateTable
CREATE TABLE "Tenant" (
"id" UUID NOT NULL,
@@ -598,6 +603,7 @@ CREATE TABLE "Tenant" (
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"deletedAt" TIMESTAMP(3),
"version" "TenantMajorEngineVersion" NOT NULL DEFAULT 'V0',
"uiVersion" "TenantMajorUIVersion" NOT NULL DEFAULT 'V0',
"name" TEXT NOT NULL,
"slug" TEXT NOT NULL,
"analyticsOptOut" BOOLEAN NOT NULL DEFAULT false,