-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Update Strum #2088
Update Strum #2088
Conversation
I have done some less rigorous testing on my own project, and I can currently confirm that |
cc @tyt2y3 |
Could you please expand upon the issue? |
Here's a part of the code from my own private project: use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use strum::{Display, EnumIter, EnumString};
use sea_orm::entity::prelude::*;
#[derive(
Clone, Debug, PartialEq, EnumIter, EnumString, Display, DeriveActiveEnum, Deserialize, Serialize,
)]
#[serde(rename_all = "snake_case")]
#[sea_orm(rs_type = "i64", db_type = "Integer")]
pub enum Permission {
#[sea_orm(num_value = 0)]
Guest,
#[sea_orm(num_value = 1)]
User,
#[sea_orm(num_value = 2)]
Manager,
#[sea_orm(num_value = 3)]
Root,
}
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Deserialize, Serialize)]
#[sea_orm(table_name = "users")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i64,
#[sea_orm(default = "now()")]
pub updated_at: DateTime<Utc>,
#[sea_orm(indexed)]
pub permission: Permission,
pub name: String,
pub password_hash: String,
pub email: String,
pub extra_profile: Option<String>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {} While using
And the
I think your patch has fixed this issue that the CI has been succeeded. I would use the new patch version of it when this PR has been merged. |
This PR should fix it. |
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |||
## Master - Pending | |||
|
|||
* Added feature flag `sqlite-use-returning-for-3_35` to use SQLite's returning https://github.com/SeaQL/sea-orm/pull/2070 | |||
* Update Strum to version 0.26 https://github.com/SeaQL/sea-orm/pull/2088 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this too!
Thank you. I just skimmed and looks good. Would invite @billy1624 too. |
This reverts commit 32cf8f7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!! @wyatt-herkamp
🎉 Released In 1.0.0 🎉Thank you everyone for the contribution! |
Breaking Changes