-
Notifications
You must be signed in to change notification settings - Fork 91
Rework changes detection; Implement tests for renames #188
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
base: master
Are you sure you want to change the base?
Changes from all commits
9ab503f
cd839d9
38bee5f
79b17e7
e6fd680
b4d619f
740fa22
fd58e13
88a2628
7dc2124
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1188,9 +1188,9 @@ sub batch_alter_table { | |
| # now add everything else | ||
| push @sql, batch_alter_table_statements( | ||
| $diff_hash, $options, qw( | ||
| rename_field | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume that this change corresponds to the change at https://github.com/dbsrgits/sql-translator/pull/188/files#diff-d1a0629b4bf9c95c1131cc9eaadd08c23943af65ad4b679de4b8190ee019a87bR315-R317, but I don't see why there needs to be a reorder of these entries.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @matthewpersico Thank you for doing review. It is documented in the commit: 740fa22
Compare: Almost the same logic as for the case when we should
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The generated statements should be in the same order. Imagine if here a column is not renamed to something else (1), then |
||
| add_field | ||
| alter_field | ||
| rename_field | ||
| alter_create_index | ||
| alter_create_constraint | ||
| alter_table | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not understanding what the
nextcallback is meant to do; would you mind expounding on that?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextcall back is fired for everydstcolumn. This is to run some code for eachdstname/column/table.At the moment this call back is used to prepare/initialize required data structures which will be filled/used later.

I agree that the name is not the best. Probably it could be better if we name it
everyorinit. Just suggest better name you like and I'll change it.