edgedb-cli
edgedb-cli copied to clipboard
Unnecessary `conv_expr` for changing cardinality on computed
- EdgeDB Version: 3.3
- EdgeDB CLI Version: 3.5.0+e1ad387
- OS Version: macos 13.5
Schema
type Target_ {
multi link latestSource := (
select .<t[is Source_] order by .created desc limit 1
)
}
type Source_ {
required created: datetime;
link t: Target_;
}
Steps to Reproduce:
- Change
latestSourcecardinality frommultitosingle - create migration,
did you convert link 'latestSource' of object type 'default::Target_' to 'single' cardinality? [y,n,l,c,b,s,q,?]
> y
Please specify an expression in order to convert link 'latestSource' of object type 'default::Target_' to 'single' cardinality:
conv_expr> (SELECT .latestSource LIMIT 1)
The expression seems unnecessary since latestSource is a computed. This one is obviously easy, and in fact the CLI fills it in for you (!!) but filing in case this would affect other migration changes to computeds or is a hint of a deeper problem.