Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--migrations-path not working #17

Closed
uqee opened this issue Jul 11, 2014 · 4 comments · Fixed by #19
Closed

--migrations-path not working #17

uqee opened this issue Jul 11, 2014 · 4 comments · Fixed by #19

Comments

@uqee
Copy link

uqee commented Jul 11, 2014

..even if it points to default [project]/migrations folder.

sequelize db:migrate

works fine, but

sequelize --migrations-path migrations db:migrate

and

sequelize --migrations-path ./migrations db:migrate

and

sequelize --migrations-path ./migrations/ db:migrate

generates an error:

Sequelize [CLI: v0.2.2, ORM: v1.7.9]

Loaded configuration file "...".
Using environment "development".
[17:29:44] Using sequelizefile [project]/node_modules/sequelize-cli/sequelizefile.js
[17:29:44] Starting 'db:migrate'...
[17:29:44] Finished 'db:migrate' after 8.52 ms
Running migrations...
20140711164439-tst.js

module.js:340
    throw err;
    ^
Error: Cannot find module 'migrations/20140711164439-tst.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at module.exports.Object.defineProperty.get ([project]/node_modules/sequelize/lib/migration.js:62:14)
    at null.<anonymous> ([project]/node_modules/sequelize/lib/migration.js:72:11)
    at null.<anonymous> ([project]/node_modules/sequelize/lib/emitters/custom-event-emitter.js:24:18)
    at processImmediate [as _immediateCallback] (timers.js:336:15)
@sdepold
Copy link
Member

sdepold commented Jul 16, 2014

Interesting ... I actually have tests that are using your patterns. Will debug it :)

@sdepold
Copy link
Member

sdepold commented Jul 16, 2014

Just noticed that I always do sequelize db:migrate --migrations-path ./path/to/migrations

@sdepold
Copy link
Member

sdepold commented Jul 16, 2014

Fixed :)

  [MYSQL] bin/sequelize db:migrate --migrations-path migrations
    ✓ creates a SequelizeMeta table (1895ms)
    ✓ creates the respective table (1838ms)
    the logging option
      ✓ does not print sql queries by default (2006ms)
      ✓ interpretes a custom option (1892ms)

  [MYSQL] bin/sequelize --migrations-path migrations db:migrate
    ✓ creates a SequelizeMeta table (1869ms)
    ✓ creates the respective table (1907ms)
    the logging option
      ✓ does not print sql queries by default (1863ms)
      ✓ interpretes a custom option (2109ms)

  [MYSQL] bin/sequelize db:migrate --migrations-path ./migrations
    ✓ creates a SequelizeMeta table (2446ms)
    ✓ creates the respective table (3223ms)
    the logging option
      ✓ does not print sql queries by default (2340ms)
      ✓ interpretes a custom option (2612ms)

  [MYSQL] bin/sequelize db:migrate --migrations-path ./migrations/
    ✓ creates a SequelizeMeta table (2112ms)
    ✓ creates the respective table (1942ms)
    the logging option
      ✓ does not print sql queries by default (1825ms)
      ✓ interpretes a custom option (1854ms)

Will be part of the next patch release

@sdepold
Copy link
Member

sdepold commented Jul 16, 2014

fixed in 0.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants