Files
carmanagement/packages/database/prisma/migrations/20260525153000_plan_features/migration.sql
T
root 7ff2dbb139
Build & Deploy / Build & Push Docker Image (push) Successful in 2m55s
Test / Type Check (all packages) (push) Successful in 54s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Failing after 48s
Test / Homepage Unit Tests (push) Successful in 43s
Test / Storefront Unit Tests (push) Failing after 40s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Failing after 42s
Test / API Integration Tests (push) Successful in 1m0s
chore: wire Carplace into dev and production stacks
2026-07-02 18:15:42 -04:00

29 lines
1.3 KiB
SQL

CREATE TABLE "plan_features" (
"id" TEXT NOT NULL,
"plan" "Plan" NOT NULL,
"label" TEXT NOT NULL,
"sortOrder" INTEGER NOT NULL DEFAULT 0,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "plan_features_pkey" PRIMARY KEY ("id")
);
CREATE INDEX "plan_features_plan_sortOrder_idx" ON "plan_features"("plan", "sortOrder");
INSERT INTO "plan_features" ("id", "plan", "label", "sortOrder") VALUES
('plf_starter_1', 'STARTER', 'Up to 10 vehicles', 10),
('plf_starter_2', 'STARTER', '1 user account', 20),
('plf_starter_3', 'STARTER', 'Basic analytics', 30),
('plf_starter_4', 'STARTER', 'Carplace listing', 40),
('plf_growth_1', 'GROWTH', 'Up to 50 vehicles', 10),
('plf_growth_2', 'GROWTH', '5 user accounts', 20),
('plf_growth_3', 'GROWTH', 'Full analytics', 30),
('plf_growth_4', 'GROWTH', 'Priority Carplace placement', 40),
('plf_growth_5', 'GROWTH', 'Custom branding', 50),
('plf_pro_1', 'PRO', 'Unlimited vehicles', 10),
('plf_pro_2', 'PRO', 'Unlimited user accounts', 20),
('plf_pro_3', 'PRO', 'Advanced reports', 30),
('plf_pro_4', 'PRO', 'API access', 40),
('plf_pro_5', 'PRO', 'Dedicated support', 50);