This commit is contained in:
2020-07-16 19:32:59 +00:00
parent 9f0944d37b
commit 2ddc4029fb
5 changed files with 78 additions and 39 deletions

View File

@@ -684,17 +684,17 @@ $BODY$;
LogUpdateMessage(log);
await ExecQueryAsync("CREATE TABLE anotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " +
"userid bigint not null, ayatype integer not null, eventtype integer not null, advancenotice interval, " +
"idvalue bigint, decvalue decimal(19,4), agevalue interval, deliverymethod integer not null, deliveryaddress text, attachreportid bigint, tags varchar(255) ARRAY)");
"userid bigint not null, ayatype integer not null, eventtype integer not null, advancenotice interval not null, " +
"idvalue bigint not null, decvalue decimal(19,4) not null, agevalue interval not null, deliverymethod integer not null, deliveryaddress text, attachreportid bigint not null, tags varchar(255) ARRAY)");
await ExecQueryAsync("CREATE TABLE anotifyevent (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created timestamp not null, " +
"ayatype integer, objectid bigint, eventtype integer not null, subscriptionid bigint not null, idvalue bigint, decvalue decimal(19,4), eventdate timestamp, deliverdate timestamp, message text)");
"ayatype integer not null, objectid bigint not null, eventtype integer not null, subscriptionid bigint not null, idvalue bigint not null, decvalue decimal(19,4) not null, eventdate timestamp, deliverdate timestamp, message text)");
await ExecQueryAsync("CREATE TABLE anotification (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid bigint not null, created timestamp not null, ayatype integer, objectid bigint, eventtype integer not null, " +
await ExecQueryAsync("CREATE TABLE anotification (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, userid bigint not null, created timestamp not null, ayatype integer not null, objectid bigint not null, eventtype integer not null, " +
"subscriptionid bigint not null, message text, fetched bool not null)");
await ExecQueryAsync("CREATE TABLE anotifydeliverylog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, processed timestamp not null, ayatype integer, objectid bigint, " +
"eventtype integer not null, subscriptionid bigint not null, idvalue bigint, decvalue decimal(19,4), userid bigint not null, " +
await ExecQueryAsync("CREATE TABLE anotifydeliverylog (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, processed timestamp not null, ayatype integer not null, objectid bigint not null, " +
"eventtype integer not null, subscriptionid bigint not null, idvalue bigint not null, decvalue decimal(19,4) not null, userid bigint not null, " +
"deliverymethod integer not null, fail bool not null, error text)");
await SetSchemaLevelAsync(++currentSchema);