New db migration script - multiplatform, fix mariadb migrations

This commit is contained in:
TheArcaneBrony
2022-08-23 18:58:55 +02:00
parent 674fa8364e
commit e0e0b74788
10 changed files with 199 additions and 157 deletions
+20
View File
@@ -0,0 +1,20 @@
const readline = require("readline");
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
async function ask(question) {
return new Promise((resolve, _reject) => {
return rl.question(question, (answer) => {
resolve(answer);
});
}).catch((err) => {
console.log(err);
});
}
async function askBool(question) {
return /y?/i.test(await ask(question));
}
module.exports = {
ask,
askBool
}