Skip to content

Commit

Permalink
fix: call Model method for Migrator TruncateTable
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Apr 2, 2024
1 parent 2dc4fbc commit 27193c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions migrate/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ func (m *Migrator) MarkUnapplied(ctx context.Context, migration *Migration) erro

func (m *Migrator) TruncateTable(ctx context.Context) error {
_, err := m.db.NewTruncateTable().
Model((*Migration)(nil)).
ModelTableExpr(m.table).
Exec(ctx)
return err
Expand Down

0 comments on commit 27193c3

Please sign in to comment.