Migration questionnaire asks if property was changed when extending type with a new property
- Dominant language
- Rust
- Stars
- 175
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
- 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:
```esdl
module default {
type Person;
}
```
2. Update the schema to this and migrate:
```esdl
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> 0
did you alter property 'pounds' of object type 'default::Person'? [y,n,l,c,b,s,q,?]
>
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the migration with the two ESDL schemas in the issue and observe the CLI questionnaire, including the required-property fill expression. No implementation file or test is named; done means extending Person with HasMoney no longer prompts whether the newly inherited pounds property was altered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100