mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-12 02:58:53 -06:00
extending test to cover renames
This commit is contained in:
@@ -347,10 +347,10 @@ teardown() {
|
||||
dolt add .
|
||||
dolt commit -m "dropped column"
|
||||
|
||||
# confirm a difference exists
|
||||
# confirm RENAME statement is being used
|
||||
run dolt diff --sql newbranch firstbranch
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" != "" ]] || false
|
||||
[[ "$output" = "RENAME TABLE 'test' TO 'newname'" ]] || false
|
||||
|
||||
dolt diff --sql newbranch firstbranch > query
|
||||
dolt checkout firstbranch
|
||||
|
||||
@@ -33,6 +33,13 @@ func SQLTableDIffs(ctx context.Context, r1, r2 *doltdb.RootValue) error {
|
||||
return err
|
||||
}
|
||||
|
||||
renames := make(map[string]string)
|
||||
//rename tables
|
||||
for k, v := range renames {
|
||||
println(k, v)
|
||||
cli.Println("RENAME TABLE",sql.QuoteIdentifier(k),"TO",sql.QuoteIdentifier(v))
|
||||
}
|
||||
|
||||
// drop tables
|
||||
for _, tblName := range drops {
|
||||
cli.Println("DROP TABLE", sql.QuoteIdentifier(tblName), ";")
|
||||
|
||||
Reference in New Issue
Block a user