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

Migration questionnaire asks if property was changed when extending type with a new property #1219

Open
raddevon opened this issue Feb 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@raddevon
Copy link
Contributor

  • EdgeDB Version: 4.5+641a8f3
  • EdgeDB CLI Version: EdgeDB CLI 4.1.0+a8fe4d7
  • OS Version: macOS 14.0

When migrating to extend a type with a new property, I'm asked if I altered the property on that type. This question doesn't make sense because the property did not exist on the type before this migration to extend it, adding the property.

Answering y appears to result in migration to the desired schema, but the question doesn't make sense in the context.

Steps to Reproduce:

  1. Migrate this schema:
module default {
  type Person;
}
  1. Update the schema to this and migrate:
module default {
  type Person extending HasMoney;
  abstract type HasMoney {
    required pounds: int64;
  }
}

Output:

did you create scalar type 'default::Money'? [y,n,l,c,b,s,q,?]
> y
did you create object type 'default::HasMoney'? [y,n,l,c,b,s,q,?]
> y
did you alter object type 'default::Person'? [y,n,l,c,b,s,q,?]
> y
Please specify an expression to populate existing objects in order to make property 'pounds' of object type 'default::Person' required:
fill_expr> <default::Money>0
did you alter property 'pounds' of object type 'default::Person'? [y,n,l,c,b,s,q,?]
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant