sequelize / express-example

A proposal for the usage of Sequelize within an Express.JS application.
MIT License
2.5k stars 770 forks source link

Wrong API on migrations #28

Closed andymaster01 closed 8 years ago

andymaster01 commented 9 years ago

Hi, I'm just starting with Sequelize, and looks like a great library!.

Using the sample project, just found out that the migrations API used is not correct, I guess is something still not migrated since the project start using umzug (I suppose)

file: 20141003120222-create-user.js

Current (wrong) API:

up: function(migration, DataTypes, done) {
    migration
      .createTable('Users', {
        username: DataTypes.STRING
      })
      .complete(done)
  },

Expected (correct) API:

up: function(queryInterface, Sequelize) {
    queryInterface
      .createTable('Users', {
        username: Sequelize.STRING
      });
  },

If needed, I can create the pull request with the changes.

Again, great work guys, kudos!!

sushantdhiman commented 8 years ago

Fixed in #29