Closed
Description
Discussed in #519
Originally posted by Drakota February 13, 2022
I'm trying to seed data directly inside a migration, but I'm unable to get a DatabaseConnection handle to be able to do it.
let db = manager.get_connection();
let board = board::ActiveModel {
name: Set("Test Board".to_owned()),
..Default::default()
};
board.save(db).await?;
I tried something like this, but I'm getting:
the size for values of type 'dyn sea_schema::migration::sea_orm::ConnectionTrait' cannot be known at compilation time the trait 'std::marker::Sized' is not implemented for 'dyn sea_schema::migration::sea_orm::ConnectionTrait'
.
Metadata
Metadata
Assignees
Labels
No labels