backup and base schema creation
This commit is contained in:
parent
a91b723f04
commit
b7b6694407
11 changed files with 1030 additions and 46 deletions
|
@ -150,7 +150,7 @@ export default abstract class BackupHelper {
|
|||
(a, b) => new Date(b.split(".")[0]).getTime() - new Date(a.split(".")[0]).getTime()
|
||||
)[0];
|
||||
|
||||
if (!newestFile) {
|
||||
if (newestFile) {
|
||||
console.log(`${new Date().toISOString()}: auto-restoring ${newestFile}`);
|
||||
await this.loadBackup({ filename: newestFile });
|
||||
console.log(`${new Date().toISOString()}: finished auto-restore`);
|
||||
|
@ -652,7 +652,7 @@ export default abstract class BackupHelper {
|
|||
.insert()
|
||||
.into("template_usage")
|
||||
.values(data?.["template_usage"] ?? [])
|
||||
.orIgnore()
|
||||
.orUpdate(["headerId", "bodyId", "footerId", "headerHeight", "footerHeight"], ["scope"])
|
||||
.execute();
|
||||
}
|
||||
private static async setUser(data: { [key: string]: Array<any> }): Promise<void> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue