Skip to content

Commit

Permalink
add alter
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Moschkin committed Sep 14, 2024
1 parent f911b92 commit fbf6994
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/sequelize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ export async function makeSql(idnumber: number, makeFleet?: boolean) {
if (!fs.existsSync(dpath)) {
fs.mkdirSync(dpath);
}

if (makeFleet) {
dpath += "/fleet";
if (!fs.existsSync(dpath)) {
fs.mkdirSync(dpath);
}
}

dpath += "/" + idnumber.toString() + ".sqlite";
}

Expand All @@ -51,9 +51,9 @@ export async function makeSql(idnumber: number, makeFleet?: boolean) {
logging: false,
repositoryMode: true
});

if (newdb) {
await newdb.sync();
await newdb.sync({ alter: true });
}
return newdb;
}
Expand All @@ -63,9 +63,9 @@ export async function makeSql(idnumber: number, makeFleet?: boolean) {
logging: false,
repositoryMode: true
});

if (newdb) {
await newdb.sync();
await newdb.sync({ alter: true });
}
return newdb;
}
Expand All @@ -88,7 +88,7 @@ export async function getHistoricalDb() {
if (!fs.existsSync(dpath)) {
fs.mkdirSync(dpath);
}

dpath += "/historical.sqlite";
}

Expand Down

0 comments on commit fbf6994

Please sign in to comment.