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

down migration of a renamed column fails #3503

Closed
bbapplications opened this issue Dec 9, 2019 · 0 comments · Fixed by #4790
Closed

down migration of a renamed column fails #3503

bbapplications opened this issue Dec 9, 2019 · 0 comments · Fixed by #4790
Assignees
Labels
c/console Related to console e/quickfix can be wrapped up in few hours k/bug Something isn't working p/high candidate for being included in the upcoming sprint

Comments

@bbapplications
Copy link

when a column is renamed, the generated down migration tries to set the comment of the column with the old name before renaming it back.

ie. a column is renamed from "iconkey" to "iconKey" with camelcase

the generated down migration looks like this:

- args:
    sql: COMMENT ON COLUMN "public"."menu"."iconkey" IS E'null'
  type: run_sql
- args:
    sql: alter table "public"."menu" rename column "iconKey" to "iconkey";
  type: run_sql

and therefore fails.

after manually reversing the order it works

@rikinsk rikinsk added c/console Related to console e/quickfix can be wrapped up in few hours k/bug Something isn't working p/high candidate for being included in the upcoming sprint labels Dec 9, 2019
@soorajshankar soorajshankar reopened this May 15, 2020
soorajshankar added a commit to soorajshankar/graphql-engine that referenced this issue May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console Related to console e/quickfix can be wrapped up in few hours k/bug Something isn't working p/high candidate for being included in the upcoming sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants