mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-04 10:25:17 -06:00
Bug fix and test fix
This commit is contained in:
@@ -383,7 +383,7 @@ func SqlRowAsDeleteStmt(r sql.Row, tableName string, tableSch schema.Schema) (st
|
||||
return "", err
|
||||
}
|
||||
|
||||
b.WriteString(");")
|
||||
b.WriteString(";")
|
||||
return b.String(), nil
|
||||
}
|
||||
|
||||
|
||||
@@ -780,7 +780,7 @@ SQL
|
||||
[ $status -eq 0 ]
|
||||
[ "${lines[0]}" = 'ALTER TABLE `t` DROP PRIMARY KEY;' ]
|
||||
[ "${lines[1]}" = 'ALTER TABLE `t` ADD PRIMARY KEY (pk);' ]
|
||||
[ "${lines[2]}" = 'warning: skipping data diff due to primary key set change' ]
|
||||
[ "${lines[2]}" = 'Primary key sets differ between revisions for table t, skipping data diff' ]
|
||||
|
||||
dolt diff
|
||||
run dolt diff
|
||||
@@ -792,10 +792,12 @@ SQL
|
||||
dolt commit -am 'added primary key'
|
||||
|
||||
dolt sql -q "alter table t drop primary key"
|
||||
|
||||
|
||||
dolt diff -r sql
|
||||
run dolt diff -r sql
|
||||
[ $status -eq 0 ]
|
||||
[ "${lines[0]}" = 'ALTER TABLE `t` RENAME COLUMN `pk` TO `pk`;' ]
|
||||
[ "${lines[0]}" = 'ALTER TABLE `t` DROP PRIMARY KEY;' ]
|
||||
[[ "$output" =~ 'Primary key sets differ between revisions for table t, skipping data diff' ]] || false
|
||||
|
||||
dolt diff
|
||||
run dolt diff
|
||||
|
||||
Reference in New Issue
Block a user