Skip to content

Commit

Permalink
dbutil: expose upgradeVersionTable
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 27, 2024
1 parent d642a8a commit 84c6384
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dbutil/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ var ErrForeignTables = errors.New("the database contains foreign tables")
var ErrNotOwned = errors.New("the database is owned by")
var ErrUnsupportedDialect = errors.New("unsupported database dialect")

func DangerousInternalUpgradeVersionTable(ctx context.Context, db *Database) error {
return db.upgradeVersionTable(ctx)
}

func (db *Database) upgradeVersionTable(ctx context.Context) error {
if compatColumnExists, err := db.ColumnExists(ctx, db.VersionTable, "compat"); err != nil {
return fmt.Errorf("failed to check if version table is up to date: %w", err)
Expand Down

0 comments on commit 84c6384

Please sign in to comment.