This commit is contained in:
2021-09-22 17:23:05 +00:00
parent f912ba547a
commit 8512819a2d
8 changed files with 47 additions and 47 deletions

View File

@@ -368,7 +368,7 @@ BEGIN
case ayatype
when 0 then return 'LT:NoType';
when 1 then return 'LT:Global';
when 2 then return 'FormSetting';
when 2 then return 'FormUserOptions';
when 3 then aytable = 'auser';
when 4 then return 'LT:ServerState';
when 5 then return 'LT:License';
@@ -517,8 +517,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE TABLE atag (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, refcount BIGINT NOT NULL)");
await ExecQueryAsync("CREATE TABLE aformsetting (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
+ "userid BIGINT NOT NULL REFERENCES auser ON DELETE CASCADE, formkey VARCHAR(255) NOT NULL, setting TEXT NOT NULL)");
await ExecQueryAsync("CREATE TABLE aformuseroptions (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
+ "userid BIGINT NOT NULL REFERENCES auser ON DELETE CASCADE, formkey VARCHAR(255) NOT NULL, options TEXT NOT NULL)");
await ExecQueryAsync("CREATE TABLE aformcustom (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
+ "formkey VARCHAR(255) NOT NULL, template TEXT, UNIQUE(formkey))");