You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do you go about in creating enums? It would be awesome if it was a part of the generator. Lacking that i find it hard to add it directly to my _entities/Model.rs as that gode is overwritten on new generations.
Are there any examples on handling enums with loco?
The text was updated successfully, but these errors were encountered:
im also curious about this, for my case i dont want to create a new type enum in the database, because using enums as per documentation at seaorm, specific to each database (MySQL or PostgreSQL). How can i achieve using enum, but with creating new table with columns data type is string/text?
My concern is to be able to switch between database (MySQL and PostgreSQL) without doing some changes in the migration.
I create enums as strings in the database, manually write Rust enums under _entities::Model , add some comments and do a git checkout -p after cargo loco db entities. It works OK but would like to see a better solution as well. Haven't found a way to do this as part of the migrations yet.
Great work on this framework.
How do you go about in creating enums? It would be awesome if it was a part of the generator. Lacking that i find it hard to add it directly to my _entities/Model.rs as that gode is overwritten on new generations.
Are there any examples on handling enums with loco?
The text was updated successfully, but these errors were encountered: