Closed BlinkyStitt closed 2 years ago
For now, I wrapped the enum values in Alias::new
.col(
ColumnDef::new(SecondaryUser::Role)
.enumeration(
Alias::new("role"),
[
Alias::new("owner"),
Alias::new("admin"),
Alias::new("collaborator"),
],
)
.not_null(),
I think this is an intended change as explained in the change log.
https://github.com/SeaQL/sea-orm/blob/master/CHANGELOG.md#breaking-changes
The breaking change was documented. But the way to migrate to the new format isn't. I think an example of wrapping the &str
with Alias::new
would be helpful. Maybe under the "then" and "now" sections
Yes. I think the recommended way is to have a enum and derive Iden on it. Let me find an example
Description
With 0.9, I had an enum in my migration defined with simple strings:
With 0.10, I get this error:
Steps to Reproduce
Expected Behavior
The migration should compile
Actual Behavior
I get an error:
^ the trait 'DeriveIden' is not implemented for '&str'
Reproduces How Often
100% of the time
Versions
Changing from 0.9.3 to 0.10.0
Additional Information
This looks similar to #1143 (which also got in my way).