This commit is contained in:
msnie
2024-02-03 11:58:42 +01:00
parent 17ca1c805f
commit 5b0b5f548c
706 changed files with 135245 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
let sqlite3 = require('sqlite3').verbose();
const path = require('path');
let db = new sqlite3.Database('./haiku.db');
(async () => {
try {
const fs = require('fs');
let init = fs.readFileSync(path.join(__dirname, './init.sql')).toString();
await db.exec(init, (e, res) => {
if (e) {
console.log(e);
} else {
console.log(" - DB init CHECK DONE");
}
});
} catch (e) {
console.error(e);
}
})();
+10
View File
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS "Line5" (
id INTEGER PRIMARY KEY,
line TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS "Line7" (
id INTEGER PRIMARY KEY,
line TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);