mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* Adds basic feature flag model * Create router.ts * WIP * WIP * WIP * WIP * Emails kill switch * Adds missing migrations * Type fix * Cleanup * Revert * Cleanup * Fixes migration * Update packages/features/flags/server/utils.ts Co-authored-by: sean-brydon <[email protected]> --------- Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: sean-brydon <[email protected]>
21 lines
635 B
SQL
21 lines
635 B
SQL
-- CreateEnum
|
|
CREATE TYPE "FeatureType" AS ENUM ('RELEASE', 'EXPERIMENT', 'OPERATIONAL', 'KILL_SWITCH', 'PERMISSION');
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "Feature" (
|
|
"slug" TEXT NOT NULL,
|
|
"enabled" BOOLEAN NOT NULL DEFAULT false,
|
|
"description" TEXT,
|
|
"type" "FeatureType" DEFAULT 'RELEASE',
|
|
"stale" BOOLEAN DEFAULT false,
|
|
"lastUsedAt" TIMESTAMP(3),
|
|
"createdAt" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
|
"updatedAt" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
|
|
"updatedBy" INTEGER,
|
|
|
|
CONSTRAINT "Feature_pkey" PRIMARY KEY ("slug")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "Feature_slug_key" ON "Feature"("slug");
|