-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
add a timestamp token that can be part of the file_template #622
Comments
Sure can you: a. propose the format of this date stamp b. provide a pull request with tests |
My idea at first, was to provide an incremental value so that we could have migration files organized as follow :
As previously mentioned, it is perhaps a shallow feature to implement, comparing what has to be done in terms of development (thinking about getting the value from history or directly from fs) and the usefulness of the feature. The other interpretation, that was raised in your answer, was to provide a timestamp value, and so I see 2 kinds of values: To conclude, I have no idea which one is preferable. |
the incremental value is a non-starter. this is one of the disastrous decisions made by the SQLAlchemy-migrate project that Alembic sought to correct for. Database migrations are not necessarily linear and there is always a need to add new migrations between existing ones when dealing with situations like branch merges. As for the date tokens, we actually already have these and this issue is a duplicate of #59 . it's documented in the tutorial:
|
this behavior is already documented, so closing. |
Wouldn't it be nice to have the migration files (the ones which are in the
migration/versions
folder) sorted by creation date. These are hard to retrieve without the help of the commandalembic history
.I propose a new variable to use in the
file_template
option, that could be placed at first, so that the file order could be maintained.Is that reasonable and isn't that somehow a shallow request ?
The text was updated successfully, but these errors were encountered: