feat(server): example of pagination
This commit is contained in:
parent
37218536c5
commit
25627e166e
5 changed files with 32 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
|||
mod migrator;
|
||||
pub mod entities;
|
||||
mod migrator;
|
||||
|
||||
use migrator::Migrator;
|
||||
use sea_orm::ConnectOptions;
|
||||
|
|
@ -11,7 +11,7 @@ pub async fn init<C: Into<ConnectOptions>>(
|
|||
) -> Result<sea_orm::DatabaseConnection, sea_orm::DbErr> {
|
||||
let db = Database::connect(opt).await?;
|
||||
|
||||
Migrator::refresh(&db).await?;
|
||||
Migrator::up(&db, None).await?;
|
||||
|
||||
Ok(db)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue