This commit is contained in:
2023-03-14 14:00:53 +01:00
parent 5cb486b5ce
commit c79a342ce8
5 changed files with 138 additions and 10 deletions

View File

@ -43,7 +43,13 @@ impl MigrationTrait for Migration {
.not_null()
.default(Expr::current_timestamp()),
)
.primary_key(Index::create().col(Trip::Day).col(Trip::UserId))
.primary_key(
Index::create()
.col(Trip::Day)
.col(Trip::UserId)
.col(Trip::CoxId)
.col(Trip::Begin),
)
.to_owned(),
)
.await