This commit is contained in:
2018-09-05 22:02:23 +00:00
parent e0e5dd1942
commit cd52c3e83f
7 changed files with 46 additions and 14 deletions

View File

@@ -22,8 +22,8 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 9;
internal const long EXPECTED_COLUMN_COUNT = 77;
internal const long EXPECTED_INDEX_COUNT = 15;
internal const long EXPECTED_COLUMN_COUNT = 83;
internal const long EXPECTED_INDEX_COUNT = 16;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
/////////////////////////////////////////////////////////////////
@@ -144,7 +144,8 @@ namespace AyaNova.Util
"dlkey text, dlkeyexpire timestamp, usertype integer not null, employeenumber varchar(255), notes text, clientid bigint, headofficeid bigint, subvendorid bigint)");
//Add user options table
exec("CREATE TABLE auseroptions (id BIGSERIAL PRIMARY KEY, ownerid bigint not null)");
exec("CREATE TABLE auseroptions (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, "+
"userid bigint not null, timezoneoffset decimal(19,5) not null default 0, emailaddress text, uicolor int not null default 0)");
//Prime the db with the default MANAGER account
@@ -176,7 +177,7 @@ namespace AyaNova.Util
//Add widget table
//id, text, longtext, boolean, currency,
exec("CREATE TABLE awidget (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, " +
"startdate timestamp, enddate timestamp, dollaramount money, active bool, roles int4)");
"startdate timestamp, enddate timestamp, dollaramount decimal(19,5), active bool, roles int4)");
setSchemaLevel(++currentSchema);
}

View File

@@ -272,6 +272,8 @@ namespace AyaNova.Util
foreach (long l in ItemsAdded)
{
EventLogProcessor.AddEntry(new Event(1, l, AyaType.User, AyaEvent.Created), ct);
UserOptions UO=new UserOptions(l,1);
ct.UserOptions.Add(UO);
}
//Now save the Event Log entries