Documentation
¶
Index ¶
- func IsAllApplied(ctx context.Context, db *sql.DB, migrationsFS fs.FS, tableName string) (bool, error)
- type Migrator
- func (m *Migrator) Down(ctx context.Context) (*goose.MigrationResult, error)
- func (m *Migrator) DownTo(ctx context.Context, version int64) ([]*goose.MigrationResult, error)
- func (m *Migrator) HasPending(ctx context.Context) (bool, error)
- func (m *Migrator) Status(ctx context.Context) ([]*goose.MigrationStatus, error)
- func (m *Migrator) Up(ctx context.Context) ([]*goose.MigrationResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAllApplied ¶ added in v19.4.0
func IsAllApplied(ctx context.Context, db *sql.DB, migrationsFS fs.FS, tableName string) (bool, error)
IsAllApplied reports whether tableName exists and records every migration in migrationsFS as applied. It neither takes goose's session lock nor creates the version table, so it can poll a database that another process migrates under a different role.
Types ¶
Click to show internal directories.
Click to hide internal directories.