-
Notifications
You must be signed in to change notification settings - Fork 23
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
Cast expression suggestion when changing type of a link property references it as a standard property #1188
Comments
Interesting issue, noticed a few things:
(Correction: looks like this is indeed a CLI issue: per @msullivan the server just reports the old and new type) https://github.com/edgedb/edgedb-cli/blob/master/src/migrations/create.rs#L332
|
You're correct that the original cast suggestion won't work, even if it references the property correctly, but I wasn't sure how sophisticated and bespoke those suggestions could be. Yeah, this suggestion you made ( So, maybe this is actually two issues:
|
I was looking into this today and looks like it's pretty easy to just query the database with select schema::Cast and select schema::Function and then put together a HashMap to tell which casts are doable, and if not castable then which functions could work. So I think I can make this more intuitive in addition to the link property fix. |
When altering the type of a link property as shown in the schema at the bottom:
Suggestion is to cast a property
.date
which does not exist on the type. The suggestion should be<cal::local_date>@date
instead.Steps to Reproduce
Schema
Start:
End:
The text was updated successfully, but these errors were encountered: