We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Domain
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation)] #[sea_orm(table_name = "tt_table")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, pub pk_column_name: String, pub parent_pk_column_name: Option<String>, pub columns: Json, pub layouts: Option<Json>, pub styles: Option<Json>, #[index] #[sea_orm(extra = "DEFAULT CURRENT_TIMESTAMP")] pub create_time: chrono::DateTime<Utc>, #[index] #[sea_orm(extra = "DEFAULT CURRENT_TIMESTAMP")] pub update_time: chrono::DateTime<Utc>, #[fill_ctx(owner)] pub owner: String, }
Initializer
let db_kind = TardisFuns::reldb_by_module_or_default("").backend(); let mut tx = TardisFuns::reldb_by_module_or_default("").conn(); let compatible_type = TardisFuns::reldb_by_module_or_default("").compatible_type(); tx.begin().await?; tx.init(tt_table::ActiveModel::init(db_kind, Some("update_time"), compatible_type)).await?; tx.commit().await?;
Error
ERROR tardis::db::reldb_client: [Tardis.RelDBClient] DbErr: Execution Error: error returned from database: relation "idx-tt_table_18uz" already exists
Macro code needs to add if_not_exists like this: Index::create().if_not_exists()
if_not_exists
Index::create().if_not_exists()
The text was updated successfully, but these errors were encountered:
4t145
No branches or pull requests
Example
Domain
Initializer
Error
Macro code needs to add
if_not_exists
like this:Index::create().if_not_exists()
The text was updated successfully, but these errors were encountered: