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

Renaming between modules broken #1890

Closed
msullivan opened this issue Oct 16, 2020 · 0 comments · Fixed by #1901
Closed

Renaming between modules broken #1890

msullivan opened this issue Oct 16, 2020 · 0 comments · Fixed by #1901
Assignees

Comments

@msullivan
Copy link
Member

CREATE MODULE foo;
CREATE MODULE test;

CREATE TYPE test::Note {
    CREATE PROPERTY note -> str;
};
ALTER TYPE test::Note RENAME TO foo::Note;
DROP TYPE foo::Note;

fails with "cannot drop column id of table "edgedb_363de41f-0ffa-11eb-b2d3-bd7de72d02be"."363e70c1-0ffa-11eb-8f58-83d1b0e048ab" because other objects depend on it".

ALTER TYPE foo::Note DROP PROPERTY note;
fails with ERROR: InvalidReferenceError: property 'note' does not exist

Renaming it back to test::Note and both drops will fail with SQL errors.

@msullivan msullivan self-assigned this Oct 16, 2020
msullivan added a commit that referenced this issue Oct 17, 2020
Progess on #1890.

It feels like there might be a lot more problems here, so I'm leaving
it open until I write some more tests.
msullivan added a commit that referenced this issue Oct 20, 2020
Progess on #1890.

It feels like there might be a lot more problems here, so I'm leaving
it open until I write some more tests.
msullivan added a commit that referenced this issue Oct 20, 2020
Fix modifying expressions and add more testing.

Since types are the only qualified objects that we are claiming
working rename support for in #1772, I'm going to declare victory and
say fixes #1890 and handle issues in other constructs as I write
tests/fix renaming in those.
msullivan added a commit that referenced this issue Oct 21, 2020
Fix modifying expressions and add more testing.

Since types are the only qualified objects that we are claiming
working rename support for in #1772, I'm going to declare victory and
say fixes #1890 and handle issues in other constructs as I write
tests/fix renaming in those.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant