diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 444d4bd1..f2ed26fd 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -18,11 +18,7 @@ Changes needed to routes?? CODING WORK +++++++++++ -Overall plan for now: anything standing in the way of making the initial client shell UI needs to be done first, everything else can wait - - Audit log - - Make sure trial generated data generates log events so that we can properly test with huge dataset - - Users, etc - - Test with huge dataset +Overall plan for now: anything standing in the way of making the initial client shell UI needs to be done first, everything else can wait - Remove CREATED from all *business* objects now that event log tracks it - V7 Import: check for efficiency changes after seeing how seeder needed to be optimized - Also need to see about event log working with it, should it attempt to keep the v7 created / modifed or start afresh diff --git a/server/AyaNova/biz/TagBiz.cs b/server/AyaNova/biz/TagBiz.cs index 7ded1f43..dd765a55 100644 --- a/server/AyaNova/biz/TagBiz.cs +++ b/server/AyaNova/biz/TagBiz.cs @@ -54,8 +54,7 @@ namespace AyaNova.Biz Tag outObj = new Tag() { Name = inObj, - OwnerId = userId, - Created = System.DateTime.UtcNow + OwnerId = userId }; diff --git a/server/AyaNova/models/FileAttachment.cs b/server/AyaNova/models/FileAttachment.cs index 57425c6f..113fbf9d 100644 --- a/server/AyaNova/models/FileAttachment.cs +++ b/server/AyaNova/models/FileAttachment.cs @@ -9,7 +9,7 @@ namespace AyaNova.Models { public long Id { get; set; } public uint ConcurrencyToken { get; set; } - public DateTime Created { get; set; }//time it was uploaded not original file creation time, we don't have that + [Required] public long OwnerId { get; set; } //----------------------------------------- @@ -25,13 +25,5 @@ namespace AyaNova.Models public string ContentType { get; set; }//mime type public string Notes { get; set; } - - public FileAttachment() - { - Created = System.DateTime.UtcNow; - } - } - -} -//"AttachToObjectType and / or AttachToObjectId public AuthorizationRoles Roles { get; set; } \ No newline at end of file +} \ No newline at end of file diff --git a/server/AyaNova/models/Locale.cs b/server/AyaNova/models/Locale.cs index ffd2863e..6740c8a9 100644 --- a/server/AyaNova/models/Locale.cs +++ b/server/AyaNova/models/Locale.cs @@ -19,15 +19,7 @@ namespace AyaNova.Models [Required] public string Name { get; set; } public bool? Stock { get; set; } - public DateTime Created { get; set; } - - - public Locale() - { - Created = System.DateTime.UtcNow; - } - - + //Relationship //was this but.. diff --git a/server/AyaNova/models/Tag.cs b/server/AyaNova/models/Tag.cs index d4da1057..ccbc2525 100644 --- a/server/AyaNova/models/Tag.cs +++ b/server/AyaNova/models/Tag.cs @@ -10,7 +10,6 @@ namespace AyaNova.Models public partial class Tag { public long Id { get; set; } - public DateTime Created { get; set; } public uint ConcurrencyToken { get; set; } [Required] @@ -18,13 +17,5 @@ namespace AyaNova.Models [Required] public string Name { get; set; }//max 35 characters ascii set - - public Tag() - { - Created = System.DateTime.UtcNow; - } - - } - } diff --git a/server/AyaNova/models/TagMap.cs b/server/AyaNova/models/TagMap.cs index 156fe545..38e0691e 100644 --- a/server/AyaNova/models/TagMap.cs +++ b/server/AyaNova/models/TagMap.cs @@ -13,7 +13,6 @@ namespace AyaNova.Models public uint ConcurrencyToken { get; set; } [Required] public long OwnerId { get; set; } - public DateTime Created { get; set; } [Required] public long TagId { get; set; } @@ -22,12 +21,5 @@ namespace AyaNova.Models [Required] public AyaType TagToObjectType { get; set; } - - public TagMap() - { - Created = System.DateTime.UtcNow; - } - } - } diff --git a/server/AyaNova/models/User.cs b/server/AyaNova/models/User.cs index 5c78c1f8..47d94e91 100644 --- a/server/AyaNova/models/User.cs +++ b/server/AyaNova/models/User.cs @@ -8,7 +8,6 @@ namespace AyaNova.Models public partial class User { public long Id { get; set; } - public DateTime Created { get; set; } public uint ConcurrencyToken { get; set; } [Required] public long OwnerId { get; set; } @@ -21,12 +20,5 @@ namespace AyaNova.Models public DateTime? DlKeyExpire { get; set; } public long LocaleId { get; set; } - - public User() - { - Created = System.DateTime.UtcNow; - } - } - } diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 3174bb0f..46a982b2 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -120,13 +120,6 @@ namespace AyaNova.Util { LogUpdateMessage(log); - //create locale text tables - exec("CREATE TABLE alocale (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, stock bool, created timestamp not null)"); - 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 INDEX localeitemlid_key_idx ON alocaleitem (localeid,key)"); - - //create aevent biz event log table exec("CREATE TABLE aevent (id BIGSERIAL PRIMARY KEY, created timestamp not null, ownerid bigint not null," + "ayid bigint not null, aytype integer not null, ayevent integer not null, textra varchar(255))"); @@ -136,11 +129,17 @@ namespace AyaNova.Util // exec("CREATE INDEX ayid_idx ON aevent (ayid);"); // exec("CREATE INDEX aytype_idx ON aevent (aytype);"); - //Prime the db with the default LOCALES + //create locale text tables + exec("CREATE TABLE alocale (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, stock bool, created timestamp not null)"); + 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 INDEX localeitemlid_key_idx ON alocaleitem (localeid,key)"); + + //Load the default LOCALES AyaNova.Biz.PrimeData.PrimeLocales(ct); //Add user table - exec("CREATE TABLE auser (id BIGSERIAL PRIMARY KEY, created timestamp not null, ownerid bigint not null, name varchar(255) not null, " + + exec("CREATE TABLE auser (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null, " + "login text not null, password text not null, salt text not null, roles integer not null, localeid bigint REFERENCES alocale (id), " + "dlkey text, dlkeyexpire timestamp)"); @@ -185,7 +184,7 @@ namespace AyaNova.Util { LogUpdateMessage(log); - exec("CREATE TABLE afileattachment (id BIGSERIAL PRIMARY KEY, created timestamp not null, ownerid bigint not null," + + exec("CREATE TABLE afileattachment (id BIGSERIAL PRIMARY KEY, ownerid bigint not null," + "attachtoobjectid bigint not null, attachtoobjecttype integer not null, " + "storedfilename text not null, displayfilename text not null, contenttype text, notes text)"); @@ -202,9 +201,9 @@ namespace AyaNova.Util { LogUpdateMessage(log); - exec("CREATE TABLE atag (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(35) not null, created timestamp not null)"); + exec("CREATE TABLE atag (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(35) not null)"); exec("CREATE UNIQUE INDEX tagname_idx ON atag (name);"); - exec("CREATE TABLE atagmap (id BIGSERIAL PRIMARY KEY, created timestamp not null, ownerid bigint not null," + + exec("CREATE TABLE atagmap (id BIGSERIAL PRIMARY KEY, ownerid bigint not null," + "tagid bigint not null REFERENCES atag (id), tagtoobjectid bigint not null, tagtoobjecttype integer not null)"); setSchemaLevel(++currentSchema);