MCPcopy
hub / github.com/pocketbase/pocketbase / isMigrationApplied

Function isMigrationApplied

core/migrations_runner_test.go:202–212  ·  view source on GitHub ↗
(app core.App, file string)

Source from the content-addressed store, hash-verified

200}
201
202func isMigrationApplied(app core.App, file string) bool {
203 var exists int
204
205 err := app.DB().Select("(1)").
206 From(core.DefaultMigrationsTable).
207 Where(dbx.HashExp{"file": file}).
208 Limit(1).
209 Row(&exists)
210
211 return err == nil && exists > 0
212}

Calls 2

SelectMethod · 0.80
DBMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…