edgedb
edgedb copied to clipboard
When migrating an array to a `multi` property, `array_unpack(.prop)` throws an error
If a property is changed from an array to a multi
property, a cast expression of array_unpack(.prop)
should work, but instead, it throws an error:
SchemaError: possibly more than one element returned by the USING clause for the alteration of property 'names' of object type 'default::User', while a singleton is expected
- EdgeDB Version: 4.7+45e4acc
- EdgeDB CLI Version: 4.3.0-dev.1138+af2b269
- OS Version: macOS 14.0
Steps to Reproduce:
- Start a new project
- Migrate the before schema
- Migrate the after schema
- Enter the cast expression
array_unpack(.names)
Before schema:
module default {
type User {
required names: array<str>;
}
}
After schema:
module default {
type User {
required multi names: str;
}
}