/* jslint node: true */
module.exports = (sequelize, { INTEGER, STRING, BOOLEAN, DATE }) => {
  const Recycle = sequelize.define('Recycle', {
    quantity: INTEGER(4),
    address: STRING(180),
    isPickup: { type: BOOLEAN, defaultValue: false },
    date: DATE
  })

  Recycle.associate = ({ User }) => {
    Recycle.belongsTo(User, { constraints: true, foreignKeyConstraint: true })
  }

  return Recycle
}

/* jslint node: true */
module.exports = (sequelize, { INTEGER, STRING, BOOLEAN, DATE }) => {
  const Recycle = sequelize.define('Recycle', {
    quantity: INTEGER,
    address: STRING,
    isPickup: { type: BOOLEAN, defaultValue: false },
    date: DATE
  })

  Recycle.associate = ({ User }) => {
    Recycle.belongsTo(User, { constraints: true, foreignKeyConstraint: true })
  }

  return Recycle
}

--- 
+++ 
@@ -1,8 +1,8 @@
 /* jslint node: true */
 module.exports = (sequelize, { INTEGER, STRING, BOOLEAN, DATE }) => {
   const Recycle = sequelize.define('Recycle', {
-    quantity: INTEGER(4),
-    address: STRING(180),
+    quantity: INTEGER,
+    address: STRING,
     isPickup: { type: BOOLEAN, defaultValue: false },
     date: DATE
   })
Enforce column constraints similar to form validation

(fixes #844)
