You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, dolt merge only seems to consider schema changes that deal with the addition or deletion of columns. Other schema changes are not brought across. This can be replicated by the following:
dolt init
dolt sql <<SQLCREATE TABLE test ( pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT);INSERT INTO test VALUES (0, 0, 0), (1, 1, 1);SQL
dolt add -A
dolt commit -m "initial commit"
dolt checkout -b other
dolt checkout master
dolt sql -q "INSERT INTO test VALUES (2, 2, 2)"
dolt add -A
dolt commit -m "added 2 to master"
dolt checkout other
dolt sql <<SQLINSERT INTO test VALUES (3, 3, 3);ALTER TABLE test RENAME COLUMN v1 to v1_new;ALTER TABLE test CHANGE COLUMN v2 v2 BIGINT NOT NULL;SQL
dolt add -A
dolt commit -m "added 3 to other and change schema"
dolt checkout master
dolt merge other
dolt commit -m "merged other into master"
master: dolt schema show
test @ working
CREATE TABLE `test` (
`pk` BIGINT NOT NULL COMMENT 'tag:3228',
`v1` BIGINT COMMENT 'tag:5758',
`v2` BIGINT COMMENT 'tag:3384',
PRIMARY KEY (`pk`)
);
other: dolt schema show
test @ working
CREATE TABLE `test` (
`pk` BIGINT NOT NULL COMMENT 'tag:3228',
`v1_new` BIGINT COMMENT 'tag:5758',
`v2` BIGINT NOT NULL COMMENT 'tag:3384',
PRIMARY KEY (`pk`)
);
This applies to both indexes and foreign keys as well. The number of tested schema changes was not exhaustive, thus there may be more or less in either direction.
The text was updated successfully, but these errors were encountered:
Right now,
dolt merge
only seems to consider schema changes that deal with the addition or deletion of columns. Other schema changes are not brought across. This can be replicated by the following:master: dolt schema show
other: dolt schema show
This applies to both indexes and foreign keys as well. The number of tested schema changes was not exhaustive, thus there may be more or less in either direction.
The text was updated successfully, but these errors were encountered: