Backup
This commit is contained in:
@@ -489,6 +489,9 @@ namespace AyaNova
|
|||||||
_newLog.LogDebug("Global settings");
|
_newLog.LogDebug("Global settings");
|
||||||
ServerGlobalBizSettings.Initialize(null, dbContext);
|
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
|
//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);
|
TranslationBiz lb = new TranslationBiz(dbContext, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.OpsAdminFull);
|
||||||
lb.ValidateTranslationsAsync().Wait();
|
lb.ValidateTranslationsAsync().Wait();
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System;
|
||||||
using Newtonsoft.Json;
|
|
||||||
namespace AyaNova.Models
|
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 long Id { get; set; }//this is always 1 as there is only ever one single global Ops object
|
||||||
public uint Concurrency { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
|
|
||||||
//Global settings
|
public DateTime BackupTime { get; set; }
|
||||||
//Picklist and other searches override the normal case insensitive value
|
public DateTime LastBackup { get; set; }
|
||||||
//this is precautionarily added for non latinate languages where it could be an issue
|
public int BackupSetsToKeep { get; set; }
|
||||||
public bool SearchCaseSensitiveOnly {get;set;}
|
public bool BackupAttachments { get; set; }
|
||||||
|
|
||||||
public GlobalOpsSettings()
|
public GlobalOpsSettings()
|
||||||
{
|
{
|
||||||
Id=1;//always 1
|
Id = 1;//always 1
|
||||||
SearchCaseSensitiveOnly = false;
|
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, " +
|
await ExecQueryAsync("CREATE TABLE aglobalbizsettings (id integer NOT NULL PRIMARY KEY, " +
|
||||||
"searchcasesensitiveonly bool default false)");
|
"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
|
//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," +
|
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))");
|
"ayid bigint not null, ayatype integer not null, ayevent integer not null, textra varchar(255))");
|
||||||
|
|||||||
Reference in New Issue
Block a user