More subscription stuff
This commit is contained in:
@@ -240,14 +240,14 @@ namespace AyaNova.Util
|
||||
log.LogInformation("AyaNova database needs to be updated from schema version {0} to version {1}", currentSchema, DESIRED_SCHEMA_LEVEL);
|
||||
|
||||
//************* SCHEMA UPDATES ******************
|
||||
|
||||
bool PrimeEmptyDB = false;
|
||||
//////////////////////////////////////////////////
|
||||
// v8 initial release TABLES
|
||||
//
|
||||
if (currentSchema < 1)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
PrimeEmptyDB = true;
|
||||
//create global biz settings table
|
||||
await ExecQueryAsync("CREATE TABLE aglobalbizsettings (id INTEGER NOT NULL PRIMARY KEY, "
|
||||
+ "webaddress TEXT, phone1 TEXT, phone2 TEXT, emailaddress TEXT, postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, "
|
||||
@@ -500,8 +500,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
+ "currencyname TEXT, hour12 BOOL NOT NULL, emailaddress TEXT, phone1 TEXT, phone2 TEXT, phone3 TEXT, mapurltemplate TEXT, uicolor VARCHAR(12) NOT NULL default '#ffffff')");
|
||||
|
||||
|
||||
//Prime the db with the default SuperUser account
|
||||
await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
|
||||
// //Prime the db with the default SuperUser account
|
||||
// await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
|
||||
|
||||
//Add user table
|
||||
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, licenseagree BOOL NOT NULL, dbid TEXT, key TEXT NOT NULL)");
|
||||
@@ -1599,7 +1599,15 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
log.LogInformation("Completed updating database schema to version {0}", currentSchema);
|
||||
//*************************************************************************************
|
||||
|
||||
if (PrimeEmptyDB)
|
||||
{
|
||||
|
||||
// //Load the default TRANSLATIONS
|
||||
// await AyaNova.Biz.PrimeData.PrimeTranslations();
|
||||
|
||||
//Prime the db with the default SuperUser account
|
||||
await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
|
||||
}
|
||||
|
||||
}//eofunction
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ namespace AyaNova.Util
|
||||
watch.Start();
|
||||
|
||||
|
||||
//USERS
|
||||
//INSIDE USERS - 730 total inside users here plus couple dozen known users below
|
||||
//IT administrator, can change ops but nothing else
|
||||
await SeedUserAsync(log, 10, AuthorizationRoles.OpsAdmin, UserType.NotService, forceEmail, appendPassword);
|
||||
//business administrator, can view ops issues
|
||||
@@ -423,8 +423,10 @@ namespace AyaNova.Util
|
||||
|
||||
////////////////////////////////////////////////
|
||||
//TECHS (LICENSE CONSUMERS)
|
||||
//trial license allows 1000
|
||||
//
|
||||
//
|
||||
|
||||
//########### WARNING: if more than 250 techs must update Rockfish::ravenkeyfactory::GetRavenTrialKey to allow for more
|
||||
//regular techs
|
||||
await SeedUserAsync(log, 15, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service, forceEmail, appendPassword);
|
||||
//Restricted techs
|
||||
@@ -452,15 +454,17 @@ namespace AyaNova.Util
|
||||
|
||||
await SeedVendorAsync(log, 5000, forceEmail);
|
||||
await SeedUnitModelAsync(log, 400);
|
||||
await SeedCustomerAsync(log, 10000, slevel, forceEmail, appendPassword);
|
||||
await SeedHeadOfficeAsync(log, 500, slevel, forceEmail, appendPassword);
|
||||
|
||||
//######### WARNING trial license size limits: Each Head office is up to 3 users generated, each customer is up to 1 generated so assume fully generated
|
||||
await SeedCustomerAsync(log, 10000, slevel, forceEmail, appendPassword);//## WARNING AFFECTS LICENSE potentially 10,000 CUSTOMER users
|
||||
await SeedHeadOfficeAsync(log, 500, slevel, forceEmail, appendPassword);//## WARNING AFFECTS LICENSE potentially 1500 CUSTOMER users
|
||||
|
||||
await SeedProjectAsync(log, 1000);
|
||||
await SeedServiceRateAsync(log, 200);
|
||||
await SeedTravelRateAsync(log, 100);
|
||||
|
||||
await SeedLoanLoanUnitAsync(log, 200);
|
||||
await SeedCustomerServiceRequestAsync(log, 200, forceEmail, appendPassword);
|
||||
await SeedCustomerServiceRequestAsync(log, 200, forceEmail, appendPassword);//## WARNING AFFECTS LICENSE potentially 200 CUSTOMER users from this
|
||||
await SeedPartWarehouseAsync(log, 200);
|
||||
await SeedPartAsync(log, 10000, 1000);
|
||||
await SeedPartAssemblyAsync(log, 500);
|
||||
|
||||
Reference in New Issue
Block a user