This commit is contained in:
2018-09-18 22:24:43 +00:00
parent 6bbacbe731
commit 7f64c7f274
4 changed files with 7 additions and 4 deletions

View File

@@ -57,6 +57,7 @@ namespace AyaNova.Biz
NewLocale.Name = inObj.Name; NewLocale.Name = inObj.Name;
NewLocale.OwnerId = this.userId; NewLocale.OwnerId = this.userId;
NewLocale.Stock = false; NewLocale.Stock = false;
NewLocale.CjkIndex=false;
foreach (LocaleItem i in SourceLocale.LocaleItems) foreach (LocaleItem i in SourceLocale.LocaleItems)
{ {
NewLocale.LocaleItems.Add(new LocaleItem() { Key = i.Key, Display = i.Display }); NewLocale.LocaleItems.Add(new LocaleItem() { Key = i.Key, Display = i.Display });

View File

@@ -85,6 +85,7 @@ namespace AyaNova.Biz
l.Name = localeCode; l.Name = localeCode;
l.OwnerId = 1; l.OwnerId = 1;
l.Stock = true; l.Stock = true;
l.CjkIndex=false;
foreach (JToken t in o.Children()) foreach (JToken t in o.Children())
{ {

View File

@@ -8,7 +8,7 @@ using Newtonsoft.Json;
namespace AyaNova.Models namespace AyaNova.Models
{ {
// [JsonObject(IsReference = true)] // [JsonObject(IsReference = true)]
public partial class Locale public partial class Locale
{ {
public long Id { get; set; } public long Id { get; set; }
@@ -19,7 +19,8 @@ namespace AyaNova.Models
[Required] [Required]
public string Name { get; set; } public string Name { get; set; }
public bool? Stock { get; set; } public bool? Stock { get; set; }
public bool CjkIndex { get; set; }
//Relationship //Relationship
//was this but.. //was this but..

View File

@@ -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 = 97; internal const long EXPECTED_COLUMN_COUNT = 98;
internal const long EXPECTED_INDEX_COUNT = 20; internal const long EXPECTED_INDEX_COUNT = 20;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::PrepareDatabaseForSeeding WHEN NEW TABLES ADDED!!!!
@@ -140,7 +140,7 @@ namespace AyaNova.Util
exec("CREATE TABLE asearchkey (id BIGSERIAL PRIMARY KEY, wordid bigint not null REFERENCES asearchdictionary (id), objectid bigint not null, objecttype integer not null, inname bool not null)"); exec("CREATE TABLE asearchkey (id BIGSERIAL PRIMARY KEY, wordid bigint not null REFERENCES asearchdictionary (id), objectid bigint not null, objecttype integer not null, inname bool not null)");
//create locale text tables //create locale text tables
exec("CREATE TABLE alocale (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, stock bool)"); exec("CREATE TABLE alocale (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, stock bool, cjkindex bool default false)");
exec("CREATE UNIQUE INDEX localename_idx ON alocale (name)"); exec("CREATE UNIQUE INDEX localename_idx ON alocale (name)");
exec("CREATE TABLE alocaleitem (id BIGSERIAL PRIMARY KEY, localeid bigint not null REFERENCES alocale (id), key text not null, display text not null)"); exec("CREATE TABLE alocaleitem (id BIGSERIAL PRIMARY KEY, localeid bigint not null REFERENCES alocale (id), key text not null, display text not null)");
exec("CREATE INDEX localeitemlid_key_idx ON alocaleitem (localeid,key)"); exec("CREATE INDEX localeitemlid_key_idx ON alocaleitem (localeid,key)");