MCPcopy
hub / github.com/rubenv/sql-migrate / FindMigrations

Method FindMigrations

migrate.go:224–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222var _ MigrationSource = (*MemoryMigrationSource)(nil)
223
224func (m MemoryMigrationSource) FindMigrations() ([]*Migration, error) {
225 // Make sure migrations are sorted. In order to make the MemoryMigrationSource safe for
226 // concurrent use we should not mutate it in place. So `FindMigrations` would sort a copy
227 // of the m.Migrations.
228 migrations := make([]*Migration, len(m.Migrations))
229 copy(migrations, m.Migrations)
230 sort.Sort(byId(migrations))
231 return migrations, nil
232}
233
234// A set of migrations loaded from an http.FileServer
235

Callers

nothing calls this directly

Calls 1

byIdTypeAlias · 0.85

Tested by

no test coverage detected