refactor(server): use feature model (#9932)

This commit is contained in:
forehalo
2025-02-05 10:27:26 +00:00
parent 0ff8d3af6f
commit 7826e2b7c8
121 changed files with 1723 additions and 3826 deletions

View File

@@ -0,0 +1,2 @@
-- CreateIndex
CREATE UNIQUE INDEX "_data_migrations_name_key" ON "_data_migrations"("name");

View File

@@ -0,0 +1,24 @@
-- AlterTable
ALTER TABLE "features" ADD COLUMN "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ALTER COLUMN "type" SET DEFAULT 0,
ALTER COLUMN "configs" SET DEFAULT '{}';
-- AlterTable
ALTER TABLE "user_features" ADD COLUMN "name" VARCHAR NOT NULL DEFAULT '',
ADD COLUMN "type" INTEGER NOT NULL DEFAULT 0;
-- AlterTable
ALTER TABLE "workspace_features" ADD COLUMN "name" VARCHAR NOT NULL DEFAULT '',
ADD COLUMN "type" INTEGER NOT NULL DEFAULT 0;
-- CreateIndex
CREATE INDEX "user_features_name_idx" ON "user_features"("name");
-- CreateIndex
CREATE INDEX "user_features_feature_id_idx" ON "user_features"("feature_id");
-- CreateIndex
CREATE INDEX "workspace_features_name_idx" ON "workspace_features"("name");
-- CreateIndex
CREATE INDEX "workspace_features_feature_id_idx" ON "workspace_features"("feature_id");