init
This commit is contained in:
@@ -12,7 +12,7 @@ path = "src/lib.rs"
|
||||
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
||||
|
||||
[dependencies.sea-orm-migration]
|
||||
version = "2.0.0-rc.42"
|
||||
version = "2.0.0"
|
||||
features = [
|
||||
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
|
||||
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
|
||||
|
||||
@@ -384,13 +384,18 @@ impl MigrationTrait for Migration {
|
||||
.col(Alias::new("resource_id"))
|
||||
.unique(),
|
||||
)
|
||||
.index(
|
||||
Index::create()
|
||||
.name("idx_server_item_order_scope")
|
||||
.col(Alias::new("server_id"))
|
||||
.col(Alias::new("parent_category_id"))
|
||||
.col(Alias::new("order_key")),
|
||||
)
|
||||
.to_owned(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
manager
|
||||
.create_index(
|
||||
Index::create()
|
||||
.name("idx_server_item_order_scope")
|
||||
.table(Alias::new("server_item_order"))
|
||||
.col(Alias::new("server_id"))
|
||||
.col(Alias::new("parent_category_id"))
|
||||
.col(Alias::new("order_key"))
|
||||
.to_owned(),
|
||||
)
|
||||
.await?;
|
||||
@@ -814,6 +819,15 @@ impl MigrationTrait for Migration {
|
||||
.await?;
|
||||
}
|
||||
|
||||
manager
|
||||
.drop_index(
|
||||
Index::drop()
|
||||
.name("idx_server_item_order_scope")
|
||||
.table(Alias::new("server_item_order"))
|
||||
.to_owned(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user