Skip to content

Instantly share code, notes, and snippets.

@durango
Created May 10, 2013 03:27
Show Gist options
  • Select an option

  • Save durango/5552213 to your computer and use it in GitHub Desktop.

Select an option

Save durango/5552213 to your computer and use it in GitHub Desktop.
DataTypes error on SequelizeJS
var data = sequelize.define('NativeDataType', {
aBoolean3: Sequelize.BOOLEAN,
aBoolean4: {type: Sequelize.BOOLEAN}
})
console.log(data);
{ options:
{ timestamps: true,
instanceMethods: {},
classMethods: {},
validate: {},
freezeTableName: false,
underscored: false,
syncOnAssociation: true,
paranoid: false,
whereCollection: null,
schema: null,
schemaDelimiter: '',
omitNull: false,
hasPrimaryKeys: false },
name: 'NativeDataType',
tableName: 'NativeDataTypes',
rawAttributes:
{ aBoolean3: 'TINYINT(1)',
aBoolean4: { type: 'BOOLEAN' },
id:
{ type: 'INTEGER',
allowNull: false,
primaryKey: true,
autoIncrement: true },
createdAt: { type: 'TIMESTAMP WITH TIME ZONE', allowNull: false },
updatedAt: { type: 'TIMESTAMP WITH TIME ZONE', allowNull: false } },
daoFactoryManager:
{ daos: [ [Circular] ],
sequelize:
{ options: [Object],
config: [Object],
daoFactoryManager: [Circular],
connectorManager: [Object],
importCache: {},
queryInterface: [Object] } },
associations: {},
validate: {},
primaryKeys: {},
primaryKeyCount: 0,
hasPrimaryKeys: false,
autoIncrementField: 'id',
DAO: { [Function] super_: [Function] } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment