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

Allow absolute path for migrationFolder config #93

Open
rashadibrahimoff opened this issue Aug 3, 2024 · 0 comments
Open

Allow absolute path for migrationFolder config #93

rashadibrahimoff opened this issue Aug 3, 2024 · 0 comments

Comments

@rashadibrahimoff
Copy link

For the following configuration

export default defineConfig({
  kysely: kyselyInstance,
  migrations: {
    migrationFolder: path.resolve(__dirname, './path/to/migrations'),
  },
});

Getting the error

Migration failed with Error: ENOENT: no such file or directory, mkdir '/Users/.../project/Users/.../project/path/to/migrations'

Seems like it concatenates cwd with provided path and makes it impossible to pass absolute path.

--

It might be non-intuitive to figure out you need to pass path relative to the directory (cwd) from where you execute the command. Would be easier to follow if one can just pass absolute path.

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

No branches or pull requests

1 participant