-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data compare doesn't detect updates of NULL values #45
Comments
Hmm actually it doesn't seem linked to newly added columns, but just to NULL values as if I run my script in two steps (first update the schema, then create the diff) I run in the same issue... Example : -- SCHEMA A
CREATE TABLE public.test (
id serial NOT NULL,
"name" varchar NULL,
CONSTRAINT test_pk PRIMARY KEY (id)
);
INSERT INTO test VALUES (1, NULL); -- SCHEMA B
CREATE TABLE public.test (
id serial NOT NULL,
"name" varchar NULL,
"surname" varchar NULL,
CONSTRAINT test_pk PRIMARY KEY (id)
);
INSERT INTO test VALUES (1, 'johnny');
INSERT INTO test VALUES (2, 'alfred'); I get the script -- ...
INSERT INTO "public"."test" ("id", "name") VALUES (2, 'alfred');
-- ... missing the NULL -> ' johnny' difference. I guess there must be a comparison issue in the code, something like |
Think I found the bug here : michaelsogos/pg-diff-api#9 |
Hi !
I'm comparing two schema, where the newer schema has new columns with data.
The data compare feature correctly creates the INSERT statement (populating the new columns with the values), but does not include the new columns in UPDATE statements.
Example :
Using config
I get the script
See that "john" is correctly updated to "johnny", but the "wayne" is not populated at all, while "hitchcock" is correctly populated for the newly inserted value.
The text was updated successfully, but these errors were encountered: