-
-
Notifications
You must be signed in to change notification settings - Fork 27
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 migrations change log table #32
Comments
Hello @bancer , We have two questions here. Let's start by the simpler one:
Specically about this item I discussed here: #30 (comment) . If you want discuss more, please open another issue to keep the topics in each issue.
That one is quite interesting. However let's understand what are you suggesting here. For example, if you want add to each in the database the fields: The other possibility we have is instead to add for each table I'll create a Journal Table with the migration already applied. This is easier and it is development currently for the next revision #31 |
I think you misunderstood. There is no need to create SQL parser in order to record what migration file was executed, when and by whom. Please take a look at the article I linked above. Regarding naming - I mentioned it in the same issue because it would make it simpler to record "description" by using part of the file name - that would not require to read the contents of the file but to read only the file name in order to determine what the migration was about. And it is also more continent for developers to take a look at file names when there is need to find a specific migration than to open each file.
|
It would be nice to log the executed migrations to a table with fields like 'migration_id', 'executed_at', 'executed_by', 'description'.
We also find it quite useful to have descriptive migration file names like 001234_add_index_to_users_table.sql that could be saved to 'description' column.
Ref.: https://martinfowler.com/articles/evodb.html#AllDatabaseChangesAreMigrations
The text was updated successfully, but these errors were encountered: