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
This leads to several unexpected results, primarily occurring if the table is dropped and recreated with the generated CREATE TABLE statement.
dolt status shows that the table has been modified, but dolt diff does not show any differences:
% dolt status
On branch merge
Changes not staged for commit:
(use "dolt add <table>" to update what will be committed)
(use "dolt checkout <table>" to discard changes in working directory)
modified: foo
% dolt diff
diff --dolt a/foo b/foo
--- a/foo
+++ b/foo
%
The two versions of the table schema have different hashes, which means that they are considered different for the purposes of merging. This may lead to unresolvable merge conflicts.
I don't see any benefit to storing these default values in an unnormalized state. This is especially true if we normalize them before displaying them to the user, since it makes it nearly impossible for the user to tell how the two schemas differ.
The text was updated successfully, but these errors were encountered:
When creating a table with default values, we store the default value expression as a string in the table schema.
So for example,
CREATE TABLE foo (f float default '1.0');
stores the string'1.0'
in the table schema.However,
SHOW CREATE TABLE
normalizes these values before displaying them, soSHOW CREATE TABLE foo;
produces the following output:This leads to several unexpected results, primarily occurring if the table is dropped and recreated with the generated
CREATE TABLE
statement.dolt status
shows that the table has been modified, butdolt diff
does not show any differences:I don't see any benefit to storing these default values in an unnormalized state. This is especially true if we normalize them before displaying them to the user, since it makes it nearly impossible for the user to tell how the two schemas differ.
The text was updated successfully, but these errors were encountered: