Closed grtlr closed 2 years ago
I'd opened a similar issue, incorrectly against sea-query, too : https://github.com/SeaQL/sea-query/issues/232
Thanks!! @grtlr
It might be helpful to emphasize this in the appropriate sections of the documentation.
As discussed on Discord the first thing I would do was this.
We should separate the logic from create_table_from_entity and extract to a new function create_index_from_entity
Description
Using the
#[sea_orm(indexed)]
property only works for the MySQL backend and crashes when using sqlite.Steps to Reproduce
Put the
#[sea_orm(indexed)]
property on any field of a struct that derivesDeriveEntityModel
while using a sqlite backend.Expected Behavior
Ideally it would create the index, but at least it shouldn't crash, emitting an error at compile time.
Actual Behavior
It crashes.
Reproduces How Often
Everytime 😉.
Versions
I'm running
sea-orm v0.6.0
.Additional Information
It might be helpful to emphasize this in the appropriate sections of the documentation.