-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(share, config): more variables, placeholder and reset default (#132
) * More email share vars + unfinished placeolders config {desc} {expires} vars (unfinished) config placeholder vals * done * migrate * edit seed * removed comments * refactor: replace dependecy `luxon` with `moment` * update shareRecipientsMessage message * chore: remove `luxon` * fix: grammatically incorrect `shareRecipientsMessage` message * changed to defaultValue and value instead * fix: don't expose defaultValue to non admin user * fix: update default value if default value changes * refactor: set config value to null instead of a empty string * refactor: merge two migrations into one * fix value check empty --------- Co-authored-by: Elias Schneider <login@eliasschneider.com>
- Loading branch information
1 parent
a0d1d98
commit beece56
Showing
12 changed files
with
149 additions
and
73 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
backend/prisma/migrations/20230319120712_edited_value/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 @@ | ||
-- RedefineTables | ||
PRAGMA foreign_keys=OFF; | ||
CREATE TABLE "new_Config" ( | ||
"updatedAt" DATETIME NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"category" TEXT NOT NULL, | ||
"type" TEXT NOT NULL, | ||
"value" TEXT, | ||
"defaultValue" TEXT NOT NULL DEFAULT '', | ||
"description" TEXT NOT NULL, | ||
"obscured" BOOLEAN NOT NULL DEFAULT false, | ||
"secret" BOOLEAN NOT NULL DEFAULT true, | ||
"locked" BOOLEAN NOT NULL DEFAULT false, | ||
"order" INTEGER NOT NULL, | ||
|
||
PRIMARY KEY ("name", "category") | ||
); | ||
INSERT INTO "new_Config" ("category", "description", "locked", "name", "obscured", "order", "secret", "type", "updatedAt", "value") SELECT "category", "description", "locked", "name", "obscured", "order", "secret", "type", "updatedAt", "value" FROM "Config"; | ||
DROP TABLE "Config"; | ||
ALTER TABLE "new_Config" RENAME TO "Config"; | ||
|
||
PRAGMA foreign_key_check; | ||
PRAGMA foreign_keys=ON; |
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.