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
ALTER TABLE support for adding constraints #57
Comments
For example support the following SQL statements.
|
I'm interested in working on this. |
Hi @papparapa. Nice to hear that you are interested in working on this. Yes, that makes sense; we could add constraints to the catalog like we currently add indexes ( Since all these constraints create an index in the background, I'd suggest reusing the existing code for the And let me know if you have more specific questions or anything. :) |
Thanks @taniabogatsch for some hints! |
Hello @papparapa , I am interested in this functionality as well. Did you make any progress? |
@coffepowered No progress yet, so feel free to work on it. |
@coffepowered Have you made any progress on this? If not, I would like to assign this task: ALTER TABLE tbl RENAME CONSTRAINT constraint_name TO new_constraint_name; to @kriti-sc Edit: this is assigned to @kriti-sc until further notice. |
Hi @taniabogatsch. There exists a |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Is adding this feature still on the roadmap? I'm currently having to implement an table schema auto-patcher workflow for when a data source's schema evolves and new columns need to be added and this is complicating things for tables that need a primary key. The ability to specify a primary key in a |
@loicalleyne, on the roadmap, yes. But I can't say when we'll have this. Afaik, there have been two people working on it, but we never got a PR. |
Still not supported? |
Hi, I would like to give this a go. I know there were a couple of people that previously tried implementing this, but it's almost a year that there is no activity, so I believe I wouldn't be stepping on anybody's toes. @lnkuiper @kriti-sc please shout if you are still on it! My plan would be to start with
because this can be implemented without the constraint naming capabilities. It would then be possible to add a primary key but not remove it. If I understood correctly, adding a Let me know if you find this plan reasonable. I also have some additional questions on the expected API:
|
Constraints should be able to be dropped/created separately from the CREATE TABLE statement (i.e. as separate ALTER TABLE ADD CONSTRAINT statements). Constraints also need names for this.
The text was updated successfully, but these errors were encountered: