This commit is contained in:
2022-03-05 01:35:07 +00:00
parent 1490e8eaf9
commit 1b406b8a97
2 changed files with 5 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ namespace AyaNova.Models
public uint Concurrency { get; set; }
public List<string> CustomerTags { get; set; }//Tags to match customer with this notification
public TimeSpan AdvanceNotice { get; set; }
public long LinkReportId { get; set; }
public long? LinkReportId { get; set; }
//CREATE NOTIFY EVENT CONDITIONS - Following fields are all conditions set on whether to create a notify event or not
public AyaType AyaType { get; set; }//Note: must be specific object, not global for any object related stuff to avoid many role issues and also potential overload

View File

@@ -24,15 +24,14 @@ namespace AyaNova.Util
internal const long EXPECTED_COLUMN_COUNT = 1336;
internal const long EXPECTED_INDEX_COUNT = 154;
internal const long EXPECTED_CHECK_CONSTRAINTS = 529;
internal const long EXPECTED_CHECK_CONSTRAINTS = 527;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 198;
internal const long EXPECTED_VIEWS = 11;
internal const long EXPECTED_ROUTINES = 2;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
///////////////////////////////////////// (C1336:I154:CC529:FC198:V11:R2)
///////////////////////////////////////// (C1336:I154:CC527:FC198:V11:R2
/*
@@ -1192,7 +1191,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE TABLE anotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
+ "userid BIGINT NOT NULL REFERENCES auser (id) ON DELETE CASCADE, ayatype INTEGER NOT NULL, eventtype INTEGER NOT NULL, advancenotice INTERVAL NOT NULL, "
+ "idvalue BIGINT NOT NULL, decvalue DECIMAL(38,18) NOT NULL, agevalue INTERVAL NOT NULL, deliverymethod INTEGER NOT NULL, "
+ "deliveryaddress TEXT, linkreportid BIGINT NOT NULL, tags VARCHAR(255) ARRAY)");
+ "deliveryaddress TEXT, linkreportid BIGINT, tags VARCHAR(255) ARRAY)");
await ExecQueryAsync("CREATE TABLE anotifyevent (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, "
+ "ayatype INTEGER NOT NULL, objectid BIGINT NOT NULL, name TEXT NOT NULL, eventtype INTEGER NOT NULL, notifysubscriptionid BIGINT NOT NULL REFERENCES anotifysubscription(id) ON DELETE CASCADE, "
@@ -1211,7 +1210,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE TABLE acustomernotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
+ "customertags VARCHAR(255) ARRAY, ayatype INTEGER NOT NULL, eventtype INTEGER NOT NULL, advancenotice INTERVAL NOT NULL, "
+ "idvalue BIGINT NOT NULL, decvalue DECIMAL(38,18) NOT NULL, agevalue INTERVAL NOT NULL, "
+ "linkreportid BIGINT NOT NULL, tags VARCHAR(255) ARRAY)");
+ "linkreportid BIGINT, tags VARCHAR(255) ARRAY)");