This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -45,7 +45,7 @@
|
|||||||
//"AYANOVA_LOG_LEVEL": "Debug",
|
//"AYANOVA_LOG_LEVEL": "Debug",
|
||||||
"AYANOVA_DEFAULT_TRANSLATION": "en",
|
"AYANOVA_DEFAULT_TRANSLATION": "en",
|
||||||
//TRANSLATION MUST BE en for Integration TESTING
|
//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_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;",
|
||||||
"AYANOVA_USE_URLS": "http://*:7575;",
|
"AYANOVA_USE_URLS": "http://*:7575;",
|
||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ namespace AyaNova.Biz
|
|||||||
if (!OnDemand)
|
if (!OnDemand)
|
||||||
{
|
{
|
||||||
log.LogTrace("Checking if backup should run");
|
log.LogTrace("Checking if backup should run");
|
||||||
|
if (!ServerGlobalOpsSettingsCache.Backup.Active)
|
||||||
|
{
|
||||||
|
log.LogTrace("Automatic backup is set to INACTIVE - not backing up");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (DateTime.UtcNow < ServerGlobalOpsSettingsCache.NextBackup)
|
if (DateTime.UtcNow < ServerGlobalOpsSettingsCache.NextBackup)
|
||||||
{
|
{
|
||||||
log.LogTrace("Not past backup time yet");
|
log.LogTrace("Not past backup time yet");
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
namespace AyaNova.Models
|
namespace AyaNova.Models
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -7,17 +6,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; }
|
||||||
|
public bool Active { get; set; }
|
||||||
public DateTime BackupTime { get; set; }
|
public DateTime BackupTime { get; set; }
|
||||||
public int BackupSetsToKeep { get; set; }
|
public int BackupSetsToKeep { get; set; }
|
||||||
public bool BackupAttachments { get; set; }
|
public bool BackupAttachments { get; set; }
|
||||||
|
|
||||||
public GlobalOpsBackupSettings()
|
public GlobalOpsBackupSettings()
|
||||||
{
|
{
|
||||||
Id = 1;//always 1
|
DateTime utcNow = DateTime.UtcNow;
|
||||||
BackupTime = new DateTime(2020, 5, 19, 23, 59, 0, DateTimeKind.Local).ToUniversalTime();//date doesn't matter it only uses hour
|
Id = 1;
|
||||||
// BackupTime = DateTime.UtcNow.AddMinutes(-10);//for testing, above is regular
|
BackupTime = new DateTime(utcNow.Year, utcNow.Month, utcNow.Day, 23, 59, 0, DateTimeKind.Local).ToUniversalTime();
|
||||||
BackupSetsToKeep = 3;
|
BackupSetsToKeep = 3;
|
||||||
|
Active = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
|||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 11;
|
private const int DESIRED_SCHEMA_LEVEL = 11;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 327;
|
internal const long EXPECTED_COLUMN_COUNT = 328;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 134;
|
internal const long EXPECTED_INDEX_COUNT = 134;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
@@ -233,7 +233,7 @@ namespace AyaNova.Util
|
|||||||
"searchcasesensitiveonly bool default false)");
|
"searchcasesensitiveonly bool default false)");
|
||||||
|
|
||||||
//create global ops BACKUP settings table
|
//create global ops BACKUP settings table
|
||||||
await ExecQueryAsync("CREATE TABLE aglobalopsbackupsettings (id integer NOT NULL PRIMARY KEY, " +
|
await ExecQueryAsync("CREATE TABLE aglobalopsbackupsettings (id integer NOT NULL PRIMARY KEY, active bool not null, " +
|
||||||
"backuptime timestamp, backupsetstokeep int, backupattachments bool)");
|
"backuptime timestamp, backupsetstokeep int, backupattachments bool)");
|
||||||
|
|
||||||
//create aevent biz event log table
|
//create aevent biz event log table
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace AyaNova.Core
|
|||||||
private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/";
|
private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/";
|
||||||
|
|
||||||
// #if (DEBUG)
|
// #if (DEBUG)
|
||||||
// // private const string LICENSE_SERVER_URL = "https://nothing.exqqwweerccbjhjtgfample.com/";
|
//IF TESTING LOCAL DEV ROCKFISH:
|
||||||
// private const string LICENSE_SERVER_URL = "http://localhost:3001/";
|
// private const string LICENSE_SERVER_URL = "http://localhost:3001/";
|
||||||
// #else
|
// #else
|
||||||
// private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/";
|
// private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/";
|
||||||
|
|||||||
Reference in New Issue
Block a user