database_migration/result.rs
1use chrono::NaiveDateTime;
2
3/// Result of a migration action.
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum Migrated {
6 /// No migrations have been applied. The database is fully migrated already.
7 Nothing,
8 /// Migrated the database to the specified migration key (version).
9 UpTo(NaiveDateTime),
10 /// No forward migrations found in the migrations folder.
11 NoForwardMigrationsFound,
12}
13
14/// Result of a revert action.
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
16pub enum Reverted {
17 /// No migrations have been reverted. The database is completely reverted already.
18 Nothing,
19 /// Reverted the database to the specified migration key (version).
20 DownTo(NaiveDateTime),
21 /// The database has been reverted completely.
22 Completely,
23 /// No backward migrations found in the migrations folder.
24 NoBackwardMigrationsFound,
25}