Backup
This commit is contained in:
@@ -489,6 +489,9 @@ namespace AyaNova
|
||||
_newLog.LogDebug("Global settings");
|
||||
ServerGlobalBizSettings.Initialize(null, dbContext);
|
||||
|
||||
_newLog.LogDebug("Ops settings");
|
||||
ServerGlobalOpsSettings.Initialize(null, dbContext);
|
||||
|
||||
//Ensure translations are present, not missing any keys and that there is a server default translation that exists
|
||||
TranslationBiz lb = new TranslationBiz(dbContext, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.OpsAdminFull);
|
||||
lb.ValidateTranslationsAsync().Wait();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
|
||||
@@ -8,15 +7,18 @@ namespace AyaNova.Models
|
||||
public long Id { get; set; }//this is always 1 as there is only ever one single global Ops object
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
//Global settings
|
||||
//Picklist and other searches override the normal case insensitive value
|
||||
//this is precautionarily added for non latinate languages where it could be an issue
|
||||
public bool SearchCaseSensitiveOnly {get;set;}
|
||||
public DateTime BackupTime { get; set; }
|
||||
public DateTime LastBackup { get; set; }
|
||||
public int BackupSetsToKeep { get; set; }
|
||||
public bool BackupAttachments { get; set; }
|
||||
|
||||
public GlobalOpsSettings()
|
||||
{
|
||||
Id=1;//always 1
|
||||
SearchCaseSensitiveOnly = false;
|
||||
Id = 1;//always 1
|
||||
BackupTime = new DateTime(2020, 5, 19, 23, 59, 0, DateTimeKind.Utc);//date doesn't matter it only uses hour
|
||||
LastBackup = DateTime.MinValue;
|
||||
BackupSetsToKeep = 3;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,6 +142,10 @@ namespace AyaNova.Util
|
||||
await ExecQueryAsync("CREATE TABLE aglobalbizsettings (id integer NOT NULL PRIMARY KEY, " +
|
||||
"searchcasesensitiveonly bool default false)");
|
||||
|
||||
//create global ops settings table
|
||||
await ExecQueryAsync("CREATE TABLE aglobalopssettings (id integer NOT NULL PRIMARY KEY, " +
|
||||
"backuptime timestamp, lastbackup timestamp, backupsetstokeep int, backupattachments bool)");
|
||||
|
||||
//create aevent biz event log table
|
||||
await ExecQueryAsync("CREATE TABLE aevent (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created timestamp not null, userid bigint not null," +
|
||||
"ayid bigint not null, ayatype integer not null, ayevent integer not null, textra varchar(255))");
|
||||
|
||||
Reference in New Issue
Block a user