Skip to content

Commit

Permalink
fix: drop table if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Jan 3, 2024
1 parent 41da4a6 commit b3d0860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/chstorage/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (t Tables) Create(ctx context.Context, c chClient) error {
)
if err := c.Do(ctx, ch.Query{
Logger: zctx.From(ctx).Named("ch"),
Body: fmt.Sprintf("DROP TABLE %s", name),
Body: fmt.Sprintf("DROP TABLE IF EXISTS %s", name),
}); err != nil {
return errors.Wrapf(err, "drop %q", name)
}
Expand Down

0 comments on commit b3d0860

Please sign in to comment.