diff options
author | 2021-09-08 20:22:24 +0100 | |
---|---|---|
committer | 2021-09-08 20:22:24 +0100 | |
commit | 299801f299737364cdd3e5a526bd40df5c48ca93 (patch) | |
tree | 2d0926cdcf3088781842a83fd8ed50593006ccc2 /vendor/github.com/uptrace/bun/migrate/migrator.go | |
parent | rework media processing a little bit (#191) (diff) | |
parent | update bun library -> v1.0.4 (diff) | |
download | gotosocial-299801f299737364cdd3e5a526bd40df5c48ca93.tar.xz |
Merge pull request #195 from NyaaaWhatsUpDoc/update/bun-library
update bun library -> v1.0.4
Diffstat (limited to 'vendor/github.com/uptrace/bun/migrate/migrator.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/migrate/migrator.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/migrate/migrator.go b/vendor/github.com/uptrace/bun/migrate/migrator.go index f9b4a51c2..1808d9db8 100644 --- a/vendor/github.com/uptrace/bun/migrate/migrator.go +++ b/vendor/github.com/uptrace/bun/migrate/migrator.go @@ -115,6 +115,7 @@ func (m *Migrator) Reset(ctx context.Context) error { return m.Init(ctx) } +// Migrate runs unapplied migrations. If a migration fails, migrate immediately exits. func (m *Migrator) Migrate(ctx context.Context, opts ...MigrationOption) (*MigrationGroup, error) { cfg := newMigrationConfig(opts) @@ -146,7 +147,7 @@ func (m *Migrator) Migrate(ctx context.Context, opts ...MigrationOption) (*Migra if !cfg.nop && migration.Up != nil { if err := migration.Up(ctx, m.db); err != nil { - return nil, err + return group, err } } |