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

Resolve configuration file path on migration #112

Merged
merged 1 commit into from Nov 26, 2013

Conversation

Projects
None yet
2 participants
@p-baleine
Contributor

p-baleine commented Nov 26, 2013

It changes so that the path of the migration config file is resolved before it is required.
This avoids Cannot find module error when the configuration file path is specified as relative path:

$ cd some-project/
$ cat db/config.js
// Sample Config File
module.exports = {

  directory: './migrations-folder',

  database: {
    client: 'sqlite3',
    connection: {
      filename: './db.sqlite3'
    }
  }

};
$ ./node_modules/.bin/knex migrate:make create_posts -c ./db/config.js
tajima-junpei tajima-junpei
Resolve configuration file path on migration
It changes so that the path of the migration config file is resolved before it is required.
This avoids `Cannot find module` error when the configuration file path is specified as relative path.

tgriesser added a commit that referenced this pull request Nov 26, 2013

Merge pull request #112 from p-baleine/topic-migration-config-path
Resolve configuration file path on migration

@tgriesser tgriesser merged commit 2cc5e99 into tgriesser:master Nov 26, 2013

1 check passed

default The Travis CI build passed
Details
@tgriesser

This comment has been minimized.

Owner

tgriesser commented Nov 26, 2013

Cool, thanks @p-baleine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment