update db.ts
This commit is contained in:
parent
3b7ada6e5d
commit
e7cdf69969
1 changed files with 8 additions and 0 deletions
|
@ -57,6 +57,14 @@ export function updateDatabase(oldVersion: number, newVersion: number) {
|
|||
db.run("ALTER TABLE users ADD COLUMN expire TEXT", (err) => {
|
||||
if (err) return;
|
||||
});
|
||||
|
||||
db.run(
|
||||
"CREATE TABLE IF NOT EXISTS settings ( \
|
||||
id INTEGER PRIMARY KEY, \
|
||||
downsclaing BOOLEAN, \
|
||||
namerandomization BOOLEAN \
|
||||
)"
|
||||
);
|
||||
}
|
||||
if (oldVersion == 2) {
|
||||
console.log(`Updating database from ${oldVersion} to ${newVersion}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue