This commit is contained in:
2020-08-26 17:20:31 +00:00
parent 387ede6924
commit fc24607c5b
6 changed files with 79 additions and 5 deletions

View File

@@ -20,10 +20,10 @@ 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 = 13;
private const int DESIRED_SCHEMA_LEVEL = 14;
internal const long EXPECTED_COLUMN_COUNT = 390;
internal const long EXPECTED_INDEX_COUNT = 140;
internal const long EXPECTED_COLUMN_COUNT = 401;
internal const long EXPECTED_INDEX_COUNT = 142;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -717,7 +717,15 @@ $BODY$;
await SetSchemaLevelAsync(++currentSchema);
}
//////////////////////////////////////////////////
// REPORT table
if (currentSchema < 14)
{
LogUpdateMessage(log);
await ExecQueryAsync("CREATE TABLE areport (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name varchar(255) not null unique, active bool, " +
"notes text, roles integer not null, objecttype integer not null, template text, style text, jsprerender text, jshelpers text, rendertype integer not null )");
await SetSchemaLevelAsync(++currentSchema);
}

View File

@@ -268,6 +268,11 @@ namespace AyaNova.Util
{
await conn.OpenAsync();
//### DELIBERATELY IGNORED
//Some data is deliberately not deleted for now:
//Reports
//Logos
//Delete from user options table first
using (var cmd = new Npgsql.NpgsqlCommand())
{