case 3988
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -52,7 +52,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace AyaNova.DataList
|
||||
FieldKey = "PartPartNumber",
|
||||
AType = (int)AyaType.Part,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "apart.id",
|
||||
SqlValueColumnName = "apart.partnumber",
|
||||
SqlIdColumnName = "id",
|
||||
SqlValueColumnName = "partnumber",
|
||||
IsRowId = true
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartName",
|
||||
FieldKey = "PartName",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.name"
|
||||
SqlValueColumnName = "name"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -38,7 +38,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartNotes",
|
||||
FieldKey = "PartNotes",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.notes"
|
||||
SqlValueColumnName = "notes"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -46,7 +46,7 @@ namespace AyaNova.DataList
|
||||
TKey = "Active",
|
||||
FieldKey = "Active",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "apart.active"
|
||||
SqlValueColumnName = "active"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -54,7 +54,7 @@ namespace AyaNova.DataList
|
||||
TKey = "Tags",
|
||||
FieldKey = "Tags",
|
||||
UiFieldDataType = (int)UiFieldDataType.Tags,
|
||||
SqlValueColumnName = "apart.tags"
|
||||
SqlValueColumnName = "tags"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -62,7 +62,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartCost",
|
||||
FieldKey = "PartCost",
|
||||
UiFieldDataType = (int)UiFieldDataType.Currency,
|
||||
SqlValueColumnName = "apart.cost"
|
||||
SqlValueColumnName = "cost"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -70,7 +70,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartRetail",
|
||||
FieldKey = "PartRetail",
|
||||
UiFieldDataType = (int)UiFieldDataType.Currency,
|
||||
SqlValueColumnName = "apart.retail"
|
||||
SqlValueColumnName = "retail"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -79,8 +79,8 @@ namespace AyaNova.DataList
|
||||
TKey = "PartManufacturerID",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AType = (int)AyaType.Vendor,
|
||||
SqlIdColumnName = "aman.id",
|
||||
SqlValueColumnName = "aman.name"
|
||||
SqlIdColumnName = "manid",
|
||||
SqlValueColumnName = "manname"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -89,8 +89,8 @@ namespace AyaNova.DataList
|
||||
TKey = "PartWholesalerID",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AType = (int)AyaType.Vendor,
|
||||
SqlIdColumnName = "awhole.id",
|
||||
SqlValueColumnName = "awhole.name"
|
||||
SqlIdColumnName = "wholeid",
|
||||
SqlValueColumnName = "wholename"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -99,8 +99,8 @@ namespace AyaNova.DataList
|
||||
TKey = "PartAlternativeWholesalerID",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AType = (int)AyaType.Vendor,
|
||||
SqlIdColumnName = "aaltwhole.id",
|
||||
SqlValueColumnName = "aaltwhole.name"
|
||||
SqlIdColumnName = "altwholeid",
|
||||
SqlValueColumnName = "altwholename"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -108,7 +108,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartManufacturerNumber",
|
||||
FieldKey = "PartManufacturerNumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.manufacturernumber"
|
||||
SqlValueColumnName = "manufacturernumber"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -116,7 +116,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartWholesalerNumber",
|
||||
FieldKey = "PartWholesalerNumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.wholesalernumber"
|
||||
SqlValueColumnName = "wholesalernumber"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -124,7 +124,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartAlternativeWholesalerNumber",
|
||||
FieldKey = "PartAlternativeWholesalerNumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.alternativewholesalernumber"
|
||||
SqlValueColumnName = "alternativewholesalernumber"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -132,7 +132,7 @@ namespace AyaNova.DataList
|
||||
TKey = "UnitOfMeasure",
|
||||
FieldKey = "UnitOfMeasure",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.unitofmeasure"
|
||||
SqlValueColumnName = "unitofmeasure"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -140,7 +140,7 @@ namespace AyaNova.DataList
|
||||
TKey = "PartUPC",
|
||||
FieldKey = "PartUPC",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "apart.upc"
|
||||
SqlValueColumnName = "upc"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
@@ -148,25 +148,25 @@ namespace AyaNova.DataList
|
||||
TKey = "PartSerialNumbersAvailable",
|
||||
FieldKey = "PartSerialNumbersAvailable",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "(select array_to_string(array_agg(serial),', ') from apartserial where partid=apart.id group by partid) as sub_serials"
|
||||
SqlValueColumnName = "partserials"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom1", FieldKey = "partcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom2", FieldKey = "partcustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom3", FieldKey = "partcustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom4", FieldKey = "partcustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom5", FieldKey = "partcustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom6", FieldKey = "partcustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom7", FieldKey = "partcustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom8", FieldKey = "partcustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom9", FieldKey = "partcustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom10", FieldKey = "partcustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom11", FieldKey = "partcustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom12", FieldKey = "partcustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom13", FieldKey = "partcustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom14", FieldKey = "partcustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom15", FieldKey = "partcustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom16", FieldKey = "partcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "apart.customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom1", FieldKey = "partcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom2", FieldKey = "partcustom2", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom3", FieldKey = "partcustom3", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom4", FieldKey = "partcustom4", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom5", FieldKey = "partcustom5", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom6", FieldKey = "partcustom6", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom7", FieldKey = "partcustom7", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom8", FieldKey = "partcustom8", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom9", FieldKey = "partcustom9", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom10", FieldKey = "partcustom10", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom11", FieldKey = "partcustom11", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom12", FieldKey = "partcustom12", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom13", FieldKey = "partcustom13", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom14", FieldKey = "partcustom14", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom15", FieldKey = "partcustom15", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
FieldDefinitions.Add(new DataListFieldDefinition { TKey = "PartCustom16", FieldKey = "partcustom16", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "customfields" });
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -22,16 +22,16 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 1;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1277;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1302;
|
||||
internal const long EXPECTED_INDEX_COUNT = 145;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 518;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 193;
|
||||
internal const long EXPECTED_VIEWS = 10;
|
||||
internal const long EXPECTED_VIEWS = 11;
|
||||
internal const long EXPECTED_ROUTINES = 2;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////////////////////////////// (C1277:I145:CC518:FC193:V10:R2)
|
||||
///////////////////////////////////////////////////////////////// C1302:I145:CC518:FC193:V11:R2
|
||||
|
||||
|
||||
/*
|
||||
@@ -1196,24 +1196,12 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await SetSchemaLevelAsync(++currentSchema);
|
||||
|
||||
|
||||
//PART DATA LIST VIEW
|
||||
/*
|
||||
CREATE OR REPLACE VIEW viewpartsdatalist AS SELECT APART.*,
|
||||
AMAN.NAME AS MANNAME,
|
||||
AMAN.ID AS MANID,
|
||||
AWHOLE.NAME AS WHOLENAME,
|
||||
AWHOLE.ID AS WHOLEID,
|
||||
AALTWHOLE.NAME AS ALTWHOLENAME,
|
||||
AALTWHOLE.ID AS ALTWHOLEID,
|
||||
(SELECT ARRAY_TO_STRING(ARRAY_AGG(serial),', ')
|
||||
FROM APARTSERIAL
|
||||
WHERE PARTID = APART.ID
|
||||
GROUP BY PARTID) AS PARTSERIALS
|
||||
FROM APART
|
||||
LEFT JOIN AVENDOR AS AMAN ON (APART.MANUFACTURERID = AMAN.ID)
|
||||
LEFT JOIN AVENDOR AS AWHOLE ON (APART.WHOLESALERID = AWHOLE.ID)
|
||||
LEFT JOIN AVENDOR AS AALTWHOLE ON (APART.ALTERNATIVEWHOLESALERID = AALTWHOLE.ID)
|
||||
*/
|
||||
//PART DATA LIST VIEW
|
||||
//required to include serials from partserials table
|
||||
await ExecQueryAsync("CREATE OR REPLACE VIEW viewpartsdatalist AS SELECT APART.*, AMAN.NAME AS MANNAME, AMAN.ID AS MANID, AWHOLE.NAME AS WHOLENAME,AWHOLE.ID AS WHOLEID, "
|
||||
+ "AALTWHOLE.NAME AS ALTWHOLENAME, AALTWHOLE.ID AS ALTWHOLEID, (SELECT ARRAY_TO_STRING(ARRAY_AGG(serial),', ') FROM APARTSERIAL WHERE PARTID = APART.ID GROUP BY PARTID) AS PARTSERIALS "
|
||||
+ "FROM APART LEFT JOIN AVENDOR AS AMAN ON (APART.MANUFACTURERID = AMAN.ID) LEFT JOIN AVENDOR AS AWHOLE ON (APART.WHOLESALERID = AWHOLE.ID) LEFT JOIN AVENDOR AS AALTWHOLE ON (APART.ALTERNATIVEWHOLESALERID = AALTWHOLE.ID)");
|
||||
|
||||
|
||||
|
||||
//SCHEDULE VIEWS
|
||||
|
||||
Reference in New Issue
Block a user