Skip to content

Commit

Permalink
fix(bug): wrong order for preparing spec
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Gurtzick <[email protected]>
  • Loading branch information
wzrdtales committed Feb 11, 2019
1 parent 45eab2b commit a15eaad
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var Base = Class.extend({
);
},

_prepareSpec: function(spec, options, tableName, columnName) {
_prepareSpec: function(columnName, spec, options, tableName) {
if (spec.defaultValue.raw) {
spec.defaultValue.prep = spec.defaultValue.raw;
} else if (spec.defaultValue.special) {
Expand Down Expand Up @@ -326,14 +326,9 @@ var Base = Class.extend({
},

addColumn: function(tableName, columnName, columnSpec, callback) {
var columnSpec = this.normalizeColumnSpec(columnSpec)
var columnSpec = this.normalizeColumnSpec(columnSpec);
this._prepareSpec(columnName, columnSpec, columnDefOptions, tableName);
var def = this.createColumnDef(
columnName,
columnSpec,
{},
tableName
);
var def = this.createColumnDef(columnName, columnSpec, {}, tableName);
var extensions = '';
var self = this;

Expand Down

0 comments on commit a15eaad

Please sign in to comment.