created blank database
This commit is contained in:
parent
605799b54b
commit
a3054c8131
|
@ -1,3 +1,4 @@
|
||||||
nbproject/
|
nbproject/
|
||||||
node_modules/
|
node_modules/
|
||||||
config/config.json
|
config/config.json
|
||||||
|
db/users.db
|
21
createdb.js
21
createdb.js
|
@ -0,0 +1,21 @@
|
||||||
|
const bluebird = require("bluebird");
|
||||||
|
const sqlite = require("sqlite3");
|
||||||
|
|
||||||
|
function main() { // Not a part of bot.js
|
||||||
|
let db = new sqlite.Database("./db/users.db", (err) => {
|
||||||
|
if(err) {
|
||||||
|
console.log(err);
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
db.run("CREATE TABLE locations(usermask text, location text)", (err) => {
|
||||||
|
if(err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
db.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
Loading…
Reference in New Issue