This commit is contained in:
@@ -10,8 +10,8 @@ namespace AyaNova.Models
|
||||
public long Id { get; set; }
|
||||
public string Key { get; set; }
|
||||
public Guid DbId { get; set; }
|
||||
public int LastFetchStatus { get; set; }
|
||||
public string LastFetchMessage { get; set; }
|
||||
//public int LastFetchStatus { get; set; }
|
||||
// public string LastFetchMessage { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ 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 = 10;
|
||||
private const int DESIRED_SCHEMA_LEVEL = 9;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 104;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 102;
|
||||
internal const long EXPECTED_INDEX_COUNT = 24;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
@@ -191,7 +191,7 @@ namespace AyaNova.Util
|
||||
LogUpdateMessage(log);
|
||||
|
||||
//Add user table
|
||||
exec("CREATE TABLE alicense (id BIGSERIAL PRIMARY KEY, key text not null)");
|
||||
exec("CREATE TABLE alicense (id BIGSERIAL PRIMARY KEY, dbid uuid, key text not null)");
|
||||
|
||||
setSchemaLevel(++currentSchema);
|
||||
}
|
||||
@@ -256,27 +256,27 @@ namespace AyaNova.Util
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
//LICENSE table new columns
|
||||
//LOOKAT: DO I need this anymore???
|
||||
//answer: no because it relates to ops stuff in other tables and logging, not to the license itself (except maybe dbid?)
|
||||
if (currentSchema < 7)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
// //////////////////////////////////////////////////
|
||||
// //LICENSE table new columns
|
||||
// //LOOKAT: DO I need this anymore???
|
||||
// //answer: no because it relates to ops stuff in other tables and logging, not to the license itself (except maybe dbid?)
|
||||
// if (currentSchema < 7)
|
||||
// {
|
||||
// LogUpdateMessage(log);
|
||||
|
||||
//Add license related stuff
|
||||
exec("ALTER TABLE alicense ADD COLUMN dbid uuid");
|
||||
exec("ALTER TABLE alicense ADD COLUMN LastFetchStatus integer");
|
||||
exec("ALTER TABLE alicense ADD COLUMN LastFetchMessage text");
|
||||
// //Add license related stuff
|
||||
// exec("ALTER TABLE alicense ADD COLUMN dbid uuid");
|
||||
// exec("ALTER TABLE alicense ADD COLUMN LastFetchStatus integer");
|
||||
// exec("ALTER TABLE alicense ADD COLUMN LastFetchMessage text");
|
||||
|
||||
setSchemaLevel(++currentSchema);
|
||||
}
|
||||
// setSchemaLevel(++currentSchema);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
//DATAFILTER table
|
||||
if (currentSchema < 8)
|
||||
if (currentSchema < 7)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
@@ -288,7 +288,7 @@ namespace AyaNova.Util
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// TAGS repository
|
||||
if (currentSchema < 9)
|
||||
if (currentSchema < 8)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
exec("CREATE TABLE atag (id BIGSERIAL PRIMARY KEY, name varchar(255) not null, refcount bigint not null, UNIQUE(name))");
|
||||
@@ -299,7 +299,7 @@ namespace AyaNova.Util
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
//FORMCUSTOM table
|
||||
if (currentSchema < 10)
|
||||
if (currentSchema < 9)
|
||||
{
|
||||
LogUpdateMessage(log);
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace AyaNova.Util
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// FUTURE
|
||||
// if (currentSchema < 9)
|
||||
// if (currentSchema < 10)
|
||||
// {
|
||||
// LogUpdateMessage(log);
|
||||
|
||||
|
||||
@@ -431,9 +431,9 @@ namespace AyaNova.Core
|
||||
{
|
||||
ldb = new Models.License();
|
||||
ldb.DbId = Guid.NewGuid();
|
||||
ldb.LastFetchStatus = 0;
|
||||
//ldb.LastFetchStatus = 0;
|
||||
ldb.Key = "none";
|
||||
ldb.LastFetchMessage = "none";
|
||||
//ldb.LastFetchMessage = "none";
|
||||
ctx.License.Add(ldb);
|
||||
ctx.SaveChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user