-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server): runtime setting support
- Loading branch information
Showing
115 changed files
with
1,862 additions
and
1,086 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
packages/backend/server/migrations/20240520055805_runtime_setting/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- CreateEnum | ||
CREATE TYPE "RuntimeConfigType" AS ENUM ('String', 'Number', 'Boolean', 'Object', 'Array'); | ||
|
||
-- CreateTable | ||
CREATE TABLE "app_runtime_settings" ( | ||
"id" VARCHAR NOT NULL, | ||
"type" "RuntimeConfigType" NOT NULL, | ||
"module" VARCHAR NOT NULL, | ||
"key" VARCHAR NOT NULL, | ||
"value" JSON NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"updated_at" TIMESTAMPTZ(6) NOT NULL, | ||
"deleted_at" TIMESTAMPTZ(6), | ||
"last_updated_by" VARCHAR(36), | ||
|
||
CONSTRAINT "app_runtime_settings_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "app_runtime_settings_module_key_key" ON "app_runtime_settings"("module", "key"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "app_runtime_settings" ADD CONSTRAINT "app_runtime_settings_last_updated_by_fkey" FOREIGN KEY ("last_updated_by") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.