Add skill import functionality and update database configuration
This commit is contained in:
@@ -13,47 +13,26 @@ enum Projects {
|
||||
#[async_trait::async_trait]
|
||||
impl MigrationTrait for Migration {
|
||||
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
//
|
||||
// add column
|
||||
//
|
||||
manager
|
||||
.alter_table(
|
||||
Table::alter()
|
||||
.table(Projects::Table)
|
||||
.add_column_if_not_exists(boolean(Projects::IsHighlighted).default(false))
|
||||
.add_column_if_not_exists(boolean(Projects::IsArchived).default(false))
|
||||
.to_owned(),
|
||||
)
|
||||
.await
|
||||
.await?;
|
||||
|
||||
//
|
||||
// delete column
|
||||
//
|
||||
/*
|
||||
// Add `is_archived` column
|
||||
manager
|
||||
.alter_table(
|
||||
Table::alter()
|
||||
.table(Movies::Table)
|
||||
.drop_column(Movies::Rating)
|
||||
.table(Projects::Table)
|
||||
.add_column_if_not_exists(boolean(Projects::IsArchived).default(false))
|
||||
.to_owned(),
|
||||
)
|
||||
.await
|
||||
*/
|
||||
.await?;
|
||||
|
||||
//
|
||||
// create index
|
||||
//
|
||||
/*
|
||||
manager
|
||||
.create_index(
|
||||
Index::create()
|
||||
.name("idx-movies-rating")
|
||||
.table(Movies::Table)
|
||||
.col(Movies::Rating)
|
||||
.to_owned(),
|
||||
)
|
||||
.await;
|
||||
*/
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||
|
Reference in New Issue
Block a user