Skip to content
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

Schema Diff not generating difference for missing columns #7104

Closed
Customerology opened this issue Jan 5, 2024 · 1 comment
Closed

Schema Diff not generating difference for missing columns #7104

Customerology opened this issue Jan 5, 2024 · 1 comment
Assignees
Milestone

Comments

@Customerology
Copy link

No SQL is generated in the DDL Comparision for instances where the difference between the Source and Target is a missing column in the Target.

Note: The opposite works correctly - If there is a column in the Target that is not present in the Source then a statement is correctly generated to remove the 'extra' column from the Target.

I am running pgAdmin 8.1 on Windows 11 desktop.

To simply testing I have done the following ...

On Source DB (postgres 14.1) I created the following table:

CREATE TABLE public.atable
(
    col1 integer,
    col2 integer
);

On Target DB (postgres 14.7), running on a different server, I created the following table:

CREATE TABLE public.atable
(
    col1 integer
);

When I run Schema Diff in pgAdmin 8.1 it appears to detect there is a difference but the difference box in the DDL comparison is blank.

image

The owner is different but I am currently running the Compare with all 4 'ignore' options turned on. If I don't ignore owner, I correctly get the statement to alter the owner but still no statement to add the missing column. Most other kinds of differences are correctly generated but so far it seems that no SQL is generated for missing columns. I use this feature a lot and I believe it worked correctly in the past.

@akshay-joshi akshay-joshi moved this to 🏗 In Progress in Current Sprint (183) Jan 8, 2024
@akshay-joshi akshay-joshi added this to the 8.2 milestone Jan 8, 2024
@akshay-joshi akshay-joshi moved this from 🏗 In Progress to In Testing in Current Sprint (183) Jan 8, 2024
@akshay-joshi akshay-joshi removed their assignment Jan 8, 2024
akshay-joshi added a commit to akshay-joshi/pgadmin4 that referenced this issue Jan 8, 2024
…g columns. pgadmin-org#7104

Added copy server support, allowing the duplication of existing servers with the option to make certain modifications. pgadmin-org#6085

Fixed review comment

Updated docs
@anilsahoo20
Copy link
Contributor

Tested and verified on candidate build: https://developer.pgadmin.org/builds/2024-01-08-1/
Package: pip wheel
Environment:macOs Ventura 13.5.1

@anilsahoo20 anilsahoo20 moved this from In Testing to ✅ Done in Current Sprint (183) Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants