Actually, down should be optional
This commit is contained in:
parent
7d36e43ac1
commit
5a19f2f3e0
@ -1,4 +1,4 @@
|
|||||||
use clap::{App, Arg, AppSettings};
|
use clap::{App, AppSettings, Arg};
|
||||||
use dotenv::dotenv;
|
use dotenv::dotenv;
|
||||||
use std::{fmt::Display, process::exit};
|
use std::{fmt::Display, process::exit};
|
||||||
use tracing_subscriber::{prelude::*, EnvFilter};
|
use tracing_subscriber::{prelude::*, EnvFilter};
|
||||||
|
@ -24,5 +24,7 @@ pub trait MigrationTrait: MigrationName + Send + Sync {
|
|||||||
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr>;
|
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr>;
|
||||||
|
|
||||||
/// Define actions to perform when rolling back the migration
|
/// Define actions to perform when rolling back the migration
|
||||||
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr>;
|
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use sea_orm::sea_query::{
|
use sea_orm::sea_query::{
|
||||||
extension::postgres::{TypeAlterStatement, TypeCreateStatement, TypeDropStatement},
|
extension::postgres::{TypeAlterStatement, TypeCreateStatement, TypeDropStatement},
|
||||||
ForeignKeyCreateStatement, ForeignKeyDropStatement, IndexCreateStatement,
|
ForeignKeyCreateStatement, ForeignKeyDropStatement, IndexCreateStatement, IndexDropStatement,
|
||||||
IndexDropStatement, TableAlterStatement, TableCreateStatement, TableDropStatement,
|
TableAlterStatement, TableCreateStatement, TableDropStatement, TableRenameStatement,
|
||||||
TableRenameStatement, TableTruncateStatement,
|
TableTruncateStatement,
|
||||||
};
|
};
|
||||||
use sea_orm::{ConnectionTrait, DbBackend, DbConn, DbErr, StatementBuilder};
|
use sea_orm::{ConnectionTrait, DbBackend, DbConn, DbErr, StatementBuilder};
|
||||||
use sea_schema::{mysql::MySql, postgres::Postgres, probe::SchemaProbe, sqlite::Sqlite};
|
use sea_schema::{mysql::MySql, postgres::Postgres, probe::SchemaProbe, sqlite::Sqlite};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user