This commit is contained in:
2021-01-22 16:01:56 +00:00
parent ef9d48eabe
commit c66d080f9f
4 changed files with 124 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 15;
internal const long EXPECTED_COLUMN_COUNT = 687;
internal const long EXPECTED_COLUMN_COUNT = 699;
internal const long EXPECTED_INDEX_COUNT = 122;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -149,7 +149,7 @@ namespace AyaNova.Util
log = logger;
//Check if ayschemaversion table exists
BOOL aySchemaVersionExists = false;
bool aySchemaVersionExists = false;
using (var command = ct.Database.GetDbConnection().CreateCommand())
{
@@ -701,7 +701,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
" )");
//PART INVENTORY VIEW
await ExecQueryAsync("");
await ExecQueryAsync("CREATE VIEW vpartinventorynow AS WITH T AS (SELECT *, ROW_NUMBER() OVER(PARTITION BY partid, partwarehouseid ORDER BY entrydate DESC) AS rn FROM apartinventory) SELECT * FROM T WHERE rn = 1");
//MIGRATE_OUTSTANDING: index(s) to support inventory ops
//recheck this again once have full inventory in place and run some manual queries taken from inventory methods and issued by ef core