Skip to content

Commit 57cf97c

Browse files
committed
clean up
Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent 3dd7158 commit 57cf97c

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

lib/methods/v2/statetravel.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Object.keys(DEFAULT).forEach(m => {
3737
this.internals
3838
);
3939

40-
console.log('result', res);
4140
return res;
4241
};
4342
});
@@ -64,20 +63,23 @@ module.exports = {
6463
new StateTravel(internals, file, context),
6564
noTravelError
6665
);
67-
},
66+
}
6867

69-
hasModification: true,
68+
/* hasModification: true,
7069
7170
modify: (context, driver, internals) => {
7271
let _driver = Object.assign({}, driver);
7372
_driver.host = {};
74-
['addForeignKey'].forEach(m => {
75-
_driver.host[m] = _driver[m];
76-
_driver[m] = function (...args) {
77-
return _driver.host[m].apply(_driver, args);
78-
};
79-
});
73+
// Inject into chained operations, in this case
74+
// we directly process information from the major
75+
// creation object, so this serves only as an example currently.
76+
// ['addForeignKey'].forEach(m => {
77+
// _driver.host[m] = _driver[m];
78+
// _driver[m] = function (...args) {
79+
// return _driver.host[m].apply(_driver, args);
80+
// };
81+
// });
8082
8183
return { driver: _driver };
82-
}
84+
} */
8385
};

lib/methods/v2/translatestate.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ const methods = {
88
createTable: async (driver, [t], internals) => {
99
const mod = internals.modSchema;
1010
const schema = mod.c[t];
11-
// console.log(t, internals.modSchema, internals.modSchema.c[t]);
1211
await driver.createTable(t, schema);
1312

14-
console.log(mod.f[t]);
1513
Object.keys(schema).forEach(key => {
1614
if (schema[key].foreignKey) {
1715
delete mod.f[t][schema[key].foreignKey.name];
@@ -55,7 +53,6 @@ async function processEntry (
5553
internals,
5654
{ t: type, a: action, c: args }
5755
) {
58-
// console.log('hello', type, action, args);
5956
const f = Object.assign(methods, context.reverse);
6057
switch (type) {
6158
case 0:

lib/state.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ module.exports = {
7676
if (internals.dryRun) {
7777
return Promise.resolve();
7878
}
79-
console.log('update', state);
8079

8180
await driver._updateKV(internals.migrationState, SSTATE, internals.schema);
8281

0 commit comments

Comments
 (0)