MCPcopy Create free account
hub / github.com/Wulf/create-rust-app / needs_migration

Function needs_migration

crates/create-rust-app/src/dev/controller.rs:124–129  ·  view source on GitHub ↗
(db: &Database)

Source from the content-addressed store, hash-verified

122/// TODO: return a Result instead of panicking
123#[must_use]
124pub 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

Callers 1

handle_socketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected