Skip to content

add support for non-timestamp but still numeric migrations #300

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

Closed
psteinroe opened this issue Apr 4, 2025 · 0 comments · Fixed by #301
Closed

add support for non-timestamp but still numeric migrations #300

psteinroe opened this issue Apr 4, 2025 · 0 comments · Fixed by #301

Comments

@psteinroe
Copy link
Collaborator

Discussed in #298

Originally posted by mplanchard April 3, 2025
Right now, it seems like the after configuration for migrations is closely coupled with a file format used by certain ORMs (e.g. prisma).

In our project, the files are named like 0001_whatever.sql, with no timestamp.

If after is going to refer to a timestamp rather than a migration number, it would be nice to do it in a more generalized way. The first thing that comes to mind is using git to determine the file's last modification time, if VCS integration is enabled.

Alternatively, a configuration option to use migration numbers would be nice, which could potentially take some kind of DSL to convert filenames to migration numbers (perhaps a sed command).

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.

1 participant