mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 12:43:12 +03:00
eslint fix
This commit is contained in:
parent
46661287fa
commit
c9c9717d22
6 changed files with 58 additions and 40 deletions
|
@ -2,13 +2,18 @@ const fs = require('fs');
|
|||
const pool = require('./postgresql.js');
|
||||
|
||||
async function create_table() {
|
||||
const schema = fs.readFileSync('../shared/database/data/schema.sql', 'utf8');
|
||||
const schema = fs.readFileSync(
|
||||
'../shared/database/data/schema.sql',
|
||||
'utf8',
|
||||
);
|
||||
|
||||
for (let i = 0; i < schema.split(';').length; i++) {
|
||||
try {
|
||||
await pool.query(schema.split(';')[i]);
|
||||
} catch (err) { continue }
|
||||
} catch (err) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = create_table;
|
||||
module.exports = create_table;
|
||||
|
|
Loading…
Add table
Reference in a new issue