mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-11-05 23:40:12 +01:00
beece56327
* 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>
23 lines
866 B
SQL
23 lines
866 B
SQL
-- 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; |