diff --git a/.vscode/launch.json b/.vscode/launch.json index 396abc9b..33155498 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -45,7 +45,7 @@ //"AYANOVA_LOG_LEVEL": "Debug", "AYANOVA_DEFAULT_TRANSLATION": "en", //TRANSLATION MUST BE en for Integration TESTING - //"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true", + "AYANOVA_PERMANENTLY_ERASE_DATABASE": "true", "AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;", "AYANOVA_USE_URLS": "http://*:7575;", "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", diff --git a/server/AyaNova/models/FileAttachment.cs b/server/AyaNova/models/FileAttachment.cs index de9c70ac..4b7908c8 100644 --- a/server/AyaNova/models/FileAttachment.cs +++ b/server/AyaNova/models/FileAttachment.cs @@ -7,6 +7,10 @@ namespace AyaNova.Models public class FileAttachment { + public FileAttachment(){ + //all start out as synchronized + InSync=true; + } public long Id { get; set; } public uint Concurrency { get; set; } @@ -25,5 +29,7 @@ namespace AyaNova.Models [Required] public DateTime LastModified { get; set; } public string Notes { get; set; } + + public bool InSync {get;set;}//was on disk last sync check } } \ No newline at end of file diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 4c548e04..aec0604b 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -22,7 +22,7 @@ namespace AyaNova.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 11; - internal const long EXPECTED_COLUMN_COUNT = 325; + internal const long EXPECTED_COLUMN_COUNT = 326; internal const long EXPECTED_INDEX_COUNT = 134; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! @@ -391,7 +391,7 @@ $BODY$; await ExecQueryAsync("CREATE TABLE afileattachment (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " + "attachtoobjectid bigint not null, attachtoobjecttype integer not null, " + - "storedfilename text not null, displayfilename text not null, contenttype text, lastmodified timestamp not null, notes text)"); + "storedfilename text not null, displayfilename text not null, contenttype text, lastmodified timestamp not null, notes text, insync bool)"); //index required for ops that need to check if file already in db (delete, count refs etc) //LOOKAT: isn't this useless without the ID as well or is that not fetched?