Apply every migration not yet recorded in schema_migrations, each in its own
transaction. Idempotent: a fully-migrated database is a no-op. A session-level
advisory lock serializes concurrent callers (the others wait, then see the
migrations already applied and skip them).
Apply every migration not yet recorded in
schema_migrations, each in its own transaction. Idempotent: a fully-migrated database is a no-op. A session-level advisory lock serializes concurrent callers (the others wait, then see the migrations already applied and skip them).