drizzle-team / drizzle-team/drizzle-orm
[BUG]: Allow absolute path to migration output directory
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
?
### What version of `drizzle-kit` are you using?
?
### Describe the Bug
From drizzle-kit-mirror repo: https://github.com/drizzle-team/drizzle-kit-mirror/issues/81.
> I'm working on a project containing many custom CLI tooling to trigger different CLI commands from different libraries. To have the most reliable file path to execute, we will normally use absolute paths for all configs.
>
> With that said, Drizzle-ORM Kit is currently auto-adding a relative prefix path (`./`) to the config path without checking whether it is absolute or not when using `drizzle-kit generate:mysql` command. We can have a workaround to modify our custom CLI to handle this library specifically but it would be best to have the kit to handle it automatically.
>
> Another reason is, the same absolute path in the migrate function (provided by `drizzle-orm//migrator`) will work perfectly fine. It's better to have this behavior consistent.
>
> The idea can be: checking if the path provided is a valid "absolute" path, or will add the prefix afterward.
>
> Below is the current behavior.
>
> 
### Expected behavior
_No response_
### Environment & setup
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.