22 lines
621 B
JavaScript
22 lines
621 B
JavaScript
import sqlite3 from 'sqlite3';
|
|
|
|
const db = new sqlite3.Database("./db/employeescoreboard.db", sqlite3.OPEN_READWRITE,(err) => {
|
|
if (err) return console.error(err.message);
|
|
});
|
|
let query;
|
|
|
|
query = `CREATE TABLE Employees
|
|
(
|
|
id INTEGER PRIMARY KEY,
|
|
name VARCHAR NOT NULL,
|
|
rank VARCHAR DEFAULT \'Intern\',
|
|
coppergear INTEGER DEFAULT 0,
|
|
silvergear INTEGER DEFAULT 0,
|
|
goldgear INTEGER DEFAULT 0,
|
|
purplegear INTEGER DEFAULT 0,
|
|
copperswog INTEGER DEFAULT 0,
|
|
silverswog INTEGER DEFAULT 0,
|
|
goldswog INTEGER DEFAULT 0,
|
|
purpleswog INTEGER DEFAULT 0
|
|
)`;
|
|
db.run(query); |