不要怂,就是干,撸起袖子干!

fix indentation for #975

1 parent 12f22b1d
...@@ -172,8 +172,8 @@ module.exports = (function() { ...@@ -172,8 +172,8 @@ module.exports = (function() {
self.DAO.prototype.booleanValues.push(name); self.DAO.prototype.booleanValues.push(name);
} }
if (definition.hasOwnProperty('defaultValue')) { if (definition.hasOwnProperty('defaultValue')) {
self.DAO.prototype.defaultValues[name] = Utils._.partial( self.DAO.prototype.defaultValues[name] = Utils._.partial(
Utils.toDefaultValue, definition.defaultValue) Utils.toDefaultValue, definition.defaultValue)
} }
if (definition.hasOwnProperty('validate')) { if (definition.hasOwnProperty('validate')) {
......
...@@ -529,7 +529,7 @@ module.exports = (function() { ...@@ -529,7 +529,7 @@ module.exports = (function() {
} }
// Blobs/texts cannot have a defaultValue // Blobs/texts cannot have a defaultValue
if (dataType.type !== "TEXT" && dataType.type._binary !== true && Utils.defaultValueSchemable(dataType.defaultValue)) { if (dataType.type !== "TEXT" && dataType.type._binary !== true && Utils.defaultValueSchemable(dataType.defaultValue)) {
template += " DEFAULT " + this.escape(dataType.defaultValue) template += " DEFAULT " + this.escape(dataType.defaultValue)
} }
......
...@@ -650,10 +650,10 @@ module.exports = (function() { ...@@ -650,10 +650,10 @@ module.exports = (function() {
template += " SERIAL" template += " SERIAL"
} }
if (Utils.defaultValueSchemable(dataType.defaultValue)) { if (Utils.defaultValueSchemable(dataType.defaultValue)) {
// TODO thoroughly check that DataTypes.NOW will properly // TODO thoroughly check that DataTypes.NOW will properly
// get populated on all databases as DEFAULT value // get populated on all databases as DEFAULT value
// i.e. mysql requires: DEFAULT CURRENT_TIMESTAMP // i.e. mysql requires: DEFAULT CURRENT_TIMESTAMP
template += " DEFAULT <%= defaultValue %>" template += " DEFAULT <%= defaultValue %>"
replacements.defaultValue = this.escape(dataType.defaultValue) replacements.defaultValue = this.escape(dataType.defaultValue)
} }
......
...@@ -313,10 +313,10 @@ module.exports = (function() { ...@@ -313,10 +313,10 @@ module.exports = (function() {
template += " NOT NULL" template += " NOT NULL"
} }
if (Utils.defaultValueSchemable(dataType.defaultValue)) { if (Utils.defaultValueSchemable(dataType.defaultValue)) {
// TODO thoroughly check that DataTypes.NOW will properly // TODO thoroughly check that DataTypes.NOW will properly
// get populated on all databases as DEFAULT value // get populated on all databases as DEFAULT value
// i.e. mysql requires: DEFAULT CURRENT_TIMESTAMP // i.e. mysql requires: DEFAULT CURRENT_TIMESTAMP
template += " DEFAULT <%= defaultValue %>" template += " DEFAULT <%= defaultValue %>"
replacements.defaultValue = this.escape(dataType.defaultValue) replacements.defaultValue = this.escape(dataType.defaultValue)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!