mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
Support naming migrations sequentially (#2602)
* Support naming migrations sequentially and inferring naming scheme * Document new options and how naming is inferred * Only account for up migrations when inferring ordering
This commit is contained in:
@@ -32,6 +32,14 @@ impl MigrationType {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_up_migration(&self) -> bool {
|
||||
match self {
|
||||
MigrationType::Simple => true,
|
||||
MigrationType::ReversibleUp => true,
|
||||
MigrationType::ReversibleDown => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_down_migration(&self) -> bool {
|
||||
match self {
|
||||
MigrationType::Simple => false,
|
||||
|
||||
Reference in New Issue
Block a user