Small fix to enable mysql schema creation

This commit is contained in:
Joshua Kifer 2022-12-14 13:44:53 -07:00
parent c64d32e2c0
commit 1688994b46

View File

@ -116,6 +116,7 @@ pub async fn upgrade_to_v1(pool: &DbConnection) -> std::result::Result<(), sea_o
.col( .col(
ColumnDef::new(Groups::GroupId) ColumnDef::new(Groups::GroupId)
.integer() .integer()
.auto_increment()
.not_null() .not_null()
.primary_key(), .primary_key(),
) )
@ -309,7 +310,7 @@ pub async fn upgrade_to_v1(pool: &DbConnection) -> std::result::Result<(), sea_o
Table::create() Table::create()
.table(Metadata::Table) .table(Metadata::Table)
.if_not_exists() .if_not_exists()
.col(ColumnDef::new(Metadata::Version).tiny_integer()), .col(ColumnDef::new(Metadata::Version).tiny_unsigned()),
), ),
) )
.await?; .await?;