(db: &Database)
| 122 | /// TODO: return a Result instead of panicking |
| 123 | #[must_use] |
| 124 | pub fn needs_migration(db: &Database) -> bool { |
| 125 | let mut db = db.pool.clone().get().unwrap(); |
| 126 | |
| 127 | let source = FileBasedMigrations::find_migrations_directory().unwrap(); |
| 128 | MigrationHarness::has_pending_migration(&mut db, source).unwrap() |
| 129 | } |
| 130 | |
| 131 | /// /db/migrate |
| 132 | /// performs any pending migrations |