WIP: 5739-useDocker_inSalix #5
|
@ -6,12 +6,8 @@ const fs = require('fs-extra');
|
|||
* @param {Connection} conn MySQL connection object
|
||||
* @returns {Array<Result>} The resultset
|
||||
*/
|
||||
async function queryFromFile(conn, file, logger) {
|
||||
async function queryFromFile(conn, file) {
|
||||
const sql = await fs.readFile(file, 'utf8');
|
||||
if(logger){
|
||||
// console.log('TRY', await this.multiQuery(conn, 'SELECT * FROM vn.saleGroup;'));
|
||||
// console.log('sql: ', sql);
|
||||
}
|
||||
return await this.multiQuery(conn, sql);
|
||||
}
|
||||
|
||||
|
|
|
@ -273,15 +273,12 @@ class Push extends Command {
|
|||
|
||||
let err;
|
||||
try {
|
||||
console.log(versionDir, script.file);
|
||||
await connExt.queryFromFile(pushConn,
|
||||
`${versionsDir}/${versionDir}/${script.file}`, versionDir == '10724-maroonOrchid');
|
||||
`${versionsDir}/${versionDir}/${script.file}`);
|
||||
} catch (e) {
|
||||
err = e;
|
||||
}
|
||||
console.log('HOLAAAAAAAAAAAAAAAAAAA')
|
||||
// console.log(await conn.query(`SELECT * FROM versionLog LIMIT 1`))
|
||||
// console.log(await conn.query(`SELECT * FROM vn.saleGroup LIMIT 1`))
|
||||
|
||||
await conn.query(
|
||||
`INSERT INTO versionLog
|
||||
SET code = ?,
|
||||
|
@ -305,7 +302,7 @@ class Push extends Command {
|
|||
]
|
||||
);
|
||||
|
||||
if (err) console.log('FALLO', err);
|
||||
if (err) throw err;
|
||||
nChanges++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue