feat(server): example of pagination

This commit is contained in:
Jef Roosens 2023-07-30 18:21:07 +02:00
parent 37218536c5
commit 25627e166e
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 32 additions and 16 deletions

View file

@ -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)
}