Skip to content

Commit a58509d

Browse files
committed
Converting from TRUNCATE TABLE to DELETE TABLE to support replication.
1 parent 05b7e49 commit a58509d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/sqlserver/sqlserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func (ss *SQLServer) SetVersion(version int, dirty bool) error {
280280
return &database.Error{OrigErr: err, Err: "transaction start failed"}
281281
}
282282

283-
query := `TRUNCATE TABLE ` + ss.getMigrationTable()
283+
query := `DELETE TABLE ` + ss.getMigrationTable()
284284
if _, err := tx.Exec(query); err != nil {
285285
if errRollback := tx.Rollback(); errRollback != nil {
286286
err = multierror.Append(err, errRollback)

0 commit comments

Comments
 (0)