fix bug 16 and 17
Build & Push / Pipeline Tests (push) Successful in 1m53s
Test / Type Check (all packages) (push) Successful in 56s
Build & Push / Build & Push Docker Image (push) Failing after 4m53s
Test / API Unit Tests (push) Successful in 1m15s
Test / Homepage Unit Tests (push) Successful in 46s
Test / Carplace Unit Tests (push) Successful in 41s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 42s
Test / API Integration Tests (push) Successful in 1m6s

This commit is contained in:
root
2026-08-04 00:52:58 -04:00
parent 626da23c2e
commit 149806a773
72 changed files with 834 additions and 174 deletions
@@ -0,0 +1 @@
ALTER TYPE "Plan" ADD VALUE IF NOT EXISTS 'ENTERPRISE';
@@ -0,0 +1,6 @@
-- Superseded by 20260803000000_add_enterprise_plan_enum and
-- 20260803001000_update_vehicle_plan_limits.
-- Kept as a no-op because this migration directory was created before the
-- enum/data migration was split, and Prisma requires every migration directory
-- to contain a migration.sql file.
SELECT 1;
@@ -0,0 +1,50 @@
UPDATE "plan_features"
SET "label" = 'Up to 25 vehicles', "updatedAt" = CURRENT_TIMESTAMP
WHERE "plan" = 'STARTER' AND "label" = 'Up to 10 vehicles';
UPDATE "plan_features"
SET "label" = 'Up to 75 vehicles', "updatedAt" = CURRENT_TIMESTAMP
WHERE "plan" = 'GROWTH' AND "label" = 'Up to 50 vehicles';
UPDATE "plan_features"
SET "label" = 'Up to 150 vehicles', "updatedAt" = CURRENT_TIMESTAMP
WHERE "plan" = 'PRO' AND "label" = 'Unlimited vehicles';
INSERT INTO "pricing_configs" ("id", "plan", "billingPeriod", "amount", "updatedAt")
VALUES
('prc_enterprise_monthly', 'ENTERPRISE', 'MONTHLY', 59900, NOW()),
('prc_enterprise_annual', 'ENTERPRISE', 'ANNUAL', 575040, NOW())
ON CONFLICT ("plan", "billingPeriod") DO UPDATE
SET
"amount" = EXCLUDED."amount",
"updatedAt" = EXCLUDED."updatedAt";
INSERT INTO "plan_features" ("id", "plan", "label", "sortOrder")
VALUES
('plf_enterprise_1', 'ENTERPRISE', '150+ vehicles', 10),
('plf_enterprise_2', 'ENTERPRISE', 'Unlimited user accounts', 20),
('plf_enterprise_3', 'ENTERPRISE', 'Advanced reports', 30),
('plf_enterprise_4', 'ENTERPRISE', 'API access', 40),
('plf_enterprise_5', 'ENTERPRISE', 'Dedicated support', 50)
ON CONFLICT ("id") DO UPDATE
SET
"label" = EXCLUDED."label",
"sortOrder" = EXCLUDED."sortOrder",
"updatedAt" = CURRENT_TIMESTAMP;
INSERT INTO "subscription_menu_items" ("id", "plan", "menuItemId", "displayOrder", "isActive", "createdAt", "updatedAt")
SELECT
'smi_enterprise_' || "menuItemId",
'ENTERPRISE'::"Plan",
"menuItemId",
"displayOrder",
"isActive",
CURRENT_TIMESTAMP,
CURRENT_TIMESTAMP
FROM "subscription_menu_items"
WHERE "plan" = 'PRO'
ON CONFLICT ("plan", "menuItemId") DO UPDATE
SET
"displayOrder" = EXCLUDED."displayOrder",
"isActive" = EXCLUDED."isActive",
"updatedAt" = CURRENT_TIMESTAMP;
+1
View File
@@ -25,6 +25,7 @@ enum Plan {
STARTER
GROWTH
PRO
ENTERPRISE
}
enum BillingPeriod {