Rename database table functions to be clearer
All checks were successful
CI / CI (push) Successful in 19s
Lint Codebase / eslint (push) Successful in 12s

This commit is contained in:
SileNce5k 2024-11-06 01:44:16 +01:00
parent 4b53d875e4
commit 5a4cfd0a5f
Signed by: SileNce
GPG key ID: B0A142BB4291B204
4 changed files with 5 additions and 5 deletions

View file

@ -0,0 +1,26 @@
const sqlite3 = require('sqlite3').verbose();
module.exports = async function () {
const db = new sqlite3.Database('data/database.db');
return new Promise ((resolve, reject)=>{
db.run(
`CREATE TABLE IF NOT EXISTS timers (
ID INTEGER PRIMARY KEY AUTOINCREMENT,
user TEXT,
reminderTime INTEGER,
channel TEXT,
customMessage TEXT,
hasPassed INTEGER)`,
(err) => {
if (err) {
console.error(`Error while creating table 'timers': ${err}`);
reject(err);
} else {
console.log("Table 'timers' created successfully.");
resolve();
}
db.close();
}
);
})
}