Skip to content

Commit

Permalink
chore: use NewTruncateTable
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Aug 29, 2022
1 parent be20327 commit 68faac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrate/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (m *Migrator) MarkUnapplied(ctx context.Context, migration *Migration) erro
}

func (m *Migrator) TruncateTable(ctx context.Context) error {
_, err := m.db.Exec("TRUNCATE TABLE ?", bun.Ident(m.table))
_, err := m.db.NewTruncateTable().TableExpr(m.table).Exec(ctx)
return err
}

Expand Down

0 comments on commit 68faac9

Please sign in to comment.