-
Notifications
You must be signed in to change notification settings - Fork 869
mysql alter add inside of schema file fails #251
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
Comments
(The third line was
in case you're wondering why this wasn't a |
The problem here isn't the Am I missing something obvious here?? Looks like the only things it parses are the |
Yeah, this def seems to be a missing feature in sqlparser itself. This section of their current sql.y is useful to understand: Those lines drop everything after the That file, at minimum, needs to be patched to parse out the types at set them on that |
I've changed the title of this issue. (I was hesitant about changing the summary. @kyleconroy would you prefer a new ticket?) The https://github.com/pingcap/parser mentioned by another user in #150 seems to support this, but I'm not sure if we should switch. I'm not sure what the decision making was on our selection here (and don't have a horse in this race). @clintberry you mentioned vitess being interested in sqlc. How amenable would vitess be to patches for fuller ALTER support (and are there already some in progress)? |
Okay, I heard from Andrés Taylor that vitess is down for us to add more ALTER support to sqlparser. He says they're consciously trying to increase the SQL they support and, if we get stuck, that he's up to help us out. I've made a tracking ticket in their repo vitessio/vitess#5705 |
The new |
Say a schema file contains
sqlc
will error out with:Since
update
commands (and similar) don't actually change the schema, we could get away with dropping them completely. But perhaps all we're missing is updating the right bits of memory between query parses?(An unedited version of this was found in a codebase that's in production.)
The text was updated successfully, but these errors were encountered: