fix: refs #7759 Change order of myt-run execution
This commit is contained in:
parent
f05cc498cc
commit
07e93fbcc7
22
myt-run.js
22
myt-run.js
|
@ -149,6 +149,17 @@ class Run extends Command {
|
||||||
await server.wait();
|
await server.wait();
|
||||||
const conn = await myt.createConnection();
|
const conn = await myt.createConnection();
|
||||||
|
|
||||||
|
// Apply changes
|
||||||
|
|
||||||
|
const hasTriggers = await fs.exists(`${dumpDataDir}/triggers.sql`);
|
||||||
|
|
||||||
|
Object.assign(opts, {
|
||||||
|
triggers: !hasTriggers,
|
||||||
|
commit: true,
|
||||||
|
dbConfig
|
||||||
|
});
|
||||||
|
await myt.run(Push, opts);
|
||||||
|
|
||||||
// Mock date functions
|
// Mock date functions
|
||||||
|
|
||||||
this.emit('mockingDate');
|
this.emit('mockingDate');
|
||||||
|
@ -163,17 +174,6 @@ class Run extends Command {
|
||||||
await connExt.multiQuery(conn, sql);
|
await connExt.multiQuery(conn, sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply changes
|
|
||||||
|
|
||||||
const hasTriggers = await fs.exists(`${dumpDataDir}/triggers.sql`);
|
|
||||||
|
|
||||||
Object.assign(opts, {
|
|
||||||
triggers: !hasTriggers,
|
|
||||||
commit: true,
|
|
||||||
dbConfig
|
|
||||||
});
|
|
||||||
await myt.run(Push, opts);
|
|
||||||
|
|
||||||
// Apply fixtures
|
// Apply fixtures
|
||||||
|
|
||||||
this.emit('applyingFixtures');
|
this.emit('applyingFixtures');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.12",
|
"version": "1.6.13",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL version control",
|
"description": "MySQL version control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue