Skip to content

Unable to resolve storage 'sequelize' [on Win7 64-bit] #73

Description

@jagged3dge

Hi,

I am using sequelize-cli to migrate new changes to my running solution. Basically, creating a workflow for pushing updates to my MySQL server hosting my test db. I have one migration file named 20141218140725-create-cafe-owner.js created using the CLI's migration:create command. I used the db:migrate command and it borked giving me this error:

D:\WampDeveloper\Websites\www.example.com\webroot\api_dev>sequelize db:migrate

Sequelize [Node: 0.10.21, CLI: 1.0.0, ORM: 2.0.0-dev9]

Loaded configuration file 'config\config.json'.
[17:24:19] Using sequelizefile ~\AppData\Roaming\npm\node_modules\sequelize-cli\lib\sequelizefile.js
[17:24:19] Starting 'db:migrate'...
[17:24:19] 'db:migrate' errored after 51 ms Unable to resolve the storage: sequelize

D:\WampDeveloper\Websites\www.example.com\webroot\api_dev>

Here's my migration file migrations/20141218140725-create-cafe-owner.js :

"use strict";
module.exports = {
  up: function(migration, DataTypes, done) {
    migration.createTable("CafeOwners", {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: DataTypes.INTEGER
      },
      email: {
        type: DataTypes.STRING(100)
      },
      password: {
        type: DataTypes.STRING(255)
      },
      lastLogin: {
        allowNull: true,
        type: DataTypes.DATE,
      },
      createdAt: {
        allowNull: false,
        type: DataTypes.DATE
      },
      updatedAt: {
        allowNull: false,
        type: DataTypes.DATE
      },
      deletedAt: {
        allowNull: true,
        type: DataTypes.DATE
      },
    }).done(done);
  },
  down: function(migration, DataTypes, done) {
    migration.dropTable("CafeOwners").done(done);
  }
};

For the sake of completeness, here's my config/config.json file as well:

{
  "development": {
    "username": "dbuser",
    "password": "test123",
    "database": "sequelize_test",
    "host": "127.0.0.1",
    "dialect": "mysql"
  },
  "test": {
    "username": "eratest",
    "password": "eratest",
    "database": "sequelize_test",
    "host": "127.0.0.1",
    "dialect": "mysql"
  },
  "production": {
    "username": "ha61gc4e",
    "password": "317e7da87327b3f149b8da90fc1d5746",
    "database": "erasmus",
    "host": "127.0.0.1",
    "dialect": "mysql"
  }
}

I tried to dig through the source, but I am still learning production JS and it seems quite complicated to follow where it's going wrong. After trying to look up this error on Google, I found something about the Sequelize_meta table, but could not find such a table in my database.

Can anyone guide me in the right direction to alleviate this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions