Documentation
¶
Index ¶
- func IsAllApplied(ctx context.Context, db *sql.DB, migrationsFS fs.FS, tableName string) (bool, error)
- func VersionTableName(name string) string
- 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.
func VersionTableName ¶ added in v19.6.0
VersionTableName is the table in which goose records the applied migrations of the schema named name.
Types ¶
Click to show internal directories.
Click to hide internal directories.