Skip to content
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

Feature: ALTER REL TABLE #5097

Open
emabiz opened this issue Mar 22, 2025 · 2 comments
Open

Feature: ALTER REL TABLE #5097

emabiz opened this issue Mar 22, 2025 · 2 comments
Labels
feature New features or missing components of existing features

Comments

@emabiz
Copy link

emabiz commented Mar 22, 2025

API

Python

Description

Hi,
I don't understand if it is possible to alter a rel table after creation.
From the documentation it seems not possible.

I'd like to add new node pairs referring to the same relationship at any moment.

For example:

CREATE REL TABLE Located(FROM User TO City, FROM Shop TO City);

Now I need to add the same relationship between Event and City.
I'd like to have something like:
ALTER REL TABLE Located ADD IF NOT EXISTS(FROM Event TO City);

I don't like to create a specific new relationship like EventLocated.

In the documentation here:
https://docs.kuzudb.com/cypher/data-definition/create-table/

it is mentioned that children tables are created for managing multiple pairs node, but I don't understand if it possible and how to use them to add the new relationship above.

Is there a way to achieve this?

Thank you

@emabiz emabiz added the feature New features or missing components of existing features label Mar 22, 2025
@ray6080
Copy link
Contributor

ray6080 commented Mar 22, 2025

hi @emabiz we don't support this for now. There is an open issue here on this #5051. Will let you know once we added the support.

@emabiz
Copy link
Author

emabiz commented Mar 22, 2025

ah ok,
then for now I will try to backup and drop the table, create a new table adding the new relationships, and repopulate the table. Not very efficient but it could work.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features or missing components of existing features
Projects
None yet
Development

No branches or pull requests

2 participants