This commit is contained in:
@@ -20,7 +20,7 @@ namespace AyaNova.Util
|
||||
/////////// CHANGE THIS ON NEW SCHEMA UPDATE ////////////////////
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 11;
|
||||
private const int DESIRED_SCHEMA_LEVEL = 12;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 328;
|
||||
internal const long EXPECTED_INDEX_COUNT = 134;
|
||||
@@ -674,22 +674,28 @@ $BODY$;
|
||||
|
||||
|
||||
|
||||
// //////////////////////////////////////////////////
|
||||
// // WikiPage table
|
||||
// if (currentSchema < 11)
|
||||
// {
|
||||
// LogUpdateMessage(log);
|
||||
//////////////////////////////////////////////////
|
||||
// NOTIFICATIONS tables
|
||||
if (currentSchema < 12)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
// await ExecQueryAsync("CREATE TABLE awikipage (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " +
|
||||
// "objectid bigint not null, objecttype integer not null, " +
|
||||
// "content text)");
|
||||
await ExecQueryAsync("CREATE TABLE anotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " +
|
||||
"subscriberid bigint, subscriberayatype integer, ayatype integer, eventtype integer not null, advancenotice interval, " +
|
||||
"idvalue integer, deliverymethod integer not null, deliveryaddress text, attachreportid bigint, intags varchar(255) ARRAY NULL, outtags varchar(255) ARRAY NULL)");
|
||||
|
||||
// //INDEX: Most selective first as there is more unique ID's than unique types
|
||||
// //to take advantage of this always query with where objectid=xx and objecttype=yy order
|
||||
// await ExecQueryAsync("CREATE INDEX awikipage_typeid_idx ON awikipage (objectid, objecttype );");
|
||||
|
||||
// await SetSchemaLevelAsync(++currentSchema);
|
||||
// }
|
||||
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, eventdate timestamp, savedmessage text");
|
||||
|
||||
//created (timestamp used to clean out old stuck events), ayatype, objectid, eventtype, appliestouserid (single subscriber event), aEventDate, ASAVEDMESSAGE, HASH?
|
||||
|
||||
//INDEX: Most selective first as there is more unique ID's than unique types
|
||||
//to take advantage of this always query with where objectid=xx and objecttype=yy order
|
||||
// await ExecQueryAsync("CREATE INDEX awikipage_typeid_idx ON awikipage (objectid, objecttype );");
|
||||
|
||||
await SetSchemaLevelAsync(++currentSchema);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user