This commit is contained in:
@@ -8,6 +8,7 @@ https://www.databasesoup.com/2015/01/tag-all-things.html
|
|||||||
https://www.npgsql.org/efcore/mapping/array.html
|
https://www.npgsql.org/efcore/mapping/array.html
|
||||||
https://www.postgresql.org/docs/current/arrays.html
|
https://www.postgresql.org/docs/current/arrays.html
|
||||||
|
|
||||||
|
|
||||||
2018-12-05 Research showed that actually I'm doing tags all wrong and the multi table method is not correct performance wise or simplicity wise
|
2018-12-05 Research showed that actually I'm doing tags all wrong and the multi table method is not correct performance wise or simplicity wise
|
||||||
The winning method in a test using postgres was a text array of tags with a "gin" index see databasesoup link above.
|
The winning method in a test using postgres was a text array of tags with a "gin" index see databasesoup link above.
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ namespace AyaNova.Models
|
|||||||
public DateTime? EndDate { get; set; }
|
public DateTime? EndDate { get; set; }
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public int Count {get;set;}
|
public int Count {get;set;}
|
||||||
|
public List<string> Tags { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
|||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 9;
|
private const int DESIRED_SCHEMA_LEVEL = 9;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 107;
|
internal const long EXPECTED_COLUMN_COUNT = 108;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 24;
|
internal const long EXPECTED_INDEX_COUNT = 24;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
|
||||||
@@ -205,7 +205,7 @@ namespace AyaNova.Util
|
|||||||
//Add widget table
|
//Add widget table
|
||||||
//id, text, longtext, boolean, currency,
|
//id, text, longtext, boolean, currency,
|
||||||
exec("CREATE TABLE awidget (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, serial bigint not null," +
|
exec("CREATE TABLE awidget (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, serial bigint not null," +
|
||||||
"startdate timestamp, enddate timestamp, dollaramount decimal(19,5), active bool, roles int4, count integer, notes text)");
|
"startdate timestamp, enddate timestamp, dollaramount decimal(19,5), active bool, roles int4, count integer, notes text, tags varchar(255) ARRAY)");
|
||||||
|
|
||||||
//TEST TEST TEST ONLY FOR DEVELOPMENT TESTING TO ENSURE UNIQUENESS
|
//TEST TEST TEST ONLY FOR DEVELOPMENT TESTING TO ENSURE UNIQUENESS
|
||||||
//exec("CREATE UNIQUE INDEX awidget_serial_idx ON awidget (serial);");
|
//exec("CREATE UNIQUE INDEX awidget_serial_idx ON awidget (serial);");
|
||||||
|
|||||||
Reference in New Issue
Block a user