-
Notifications
You must be signed in to change notification settings - Fork 45
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
Implement altering column with SET DEFAULT
and DROP DEFAULT
#152
base: develop
Are you sure you want to change the base?
Conversation
8766a52
to
bb3b943
Compare
The CHANGE COLUMN logic can be extracted to a reusable method now. I'm only keeping the changes in a separate commit for a more useful diff. The update column callback can be used to modify any columns. Since it is also provided with the old column definition, it will enable column-modifying statements withtout a full column definition (like SET/DROP default). In the future, it should also unlock implementing expressions like MODIFY COLUMN and DROP COLUMN and enable modifying multiple columns at once to avoid unnecessary table copying.
bb3b943
to
c330962
Compare
@brandonpayton I took another stab at this. It required extracting all the column-changing logic to a private method, and allowing edits to the columns via a callback, so that the old column definition is available to statements like I'm not sure if it's worth pushing this much further given that #153 would change the translator quite a bit, and will likely be a chance to re-architect the translator a bit more. |
This completes the changes in the previous commit.
c330962
to
d0c4b6d
Compare
This PR implements the support for the following MySQL statements:
It required a small refactor so that the CHANGE COLUMN logic can be extracted to a reusable method.