db: Change the version number from u8 to i16
This is the smallest integer compatible with all of MySQL, Postgres and SQlite. This is a backwards-compatible change for SQlite since both are represented as "integer", and all u8 values can be represented as i16.
This commit is contained in:
committed by
nitnelave
parent
260b545a54
commit
692bbb00f1
@@ -116,6 +116,7 @@ pub async fn upgrade_to_v1(pool: &DbConnection) -> std::result::Result<(), sea_o
|
||||
.col(
|
||||
ColumnDef::new(Groups::GroupId)
|
||||
.integer()
|
||||
.auto_increment()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
@@ -309,7 +310,7 @@ pub async fn upgrade_to_v1(pool: &DbConnection) -> std::result::Result<(), sea_o
|
||||
Table::create()
|
||||
.table(Metadata::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(Metadata::Version).tiny_integer()),
|
||||
.col(ColumnDef::new(Metadata::Version).small_integer()),
|
||||
),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user