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

invalid diff for changes in generated column #24

Open
frisi opened this issue Nov 24, 2021 · 0 comments
Open

invalid diff for changes in generated column #24

frisi opened this issue Nov 24, 2021 · 0 comments

Comments

@frisi
Copy link

frisi commented Nov 24, 2021

running apgdiff old_dump.sql vanilla_dump.sql produces an invalid diff

vanilla_dump.sql:

CREATE TABLE gql.article_properties (
    digests gql.sha1_digest[] GENERATED ALWAYS AS (gql.used_digests(main_image, og_image, blocks)) STORED
);

old_dump.sql:

CREATE TABLE gql.article_properties (
    digests gql.sha1_digest[] GENERATED ALWAYS AS (gql.used_digests(main_image, blocks)) STORED
);

produced diff

ALTER TABLE article_properties
  ...
  ALTER COLUMN digests TYPE gql.sha1_digest[] GENERATED ALWAYS AS (gql.used_digests(main_image, og_image, blocks)) STORED USING digests::gql.sha1_digest[] GENERATED ALWAYS AS (gql.used_digests(main_image, og_image, blocks)) STORED;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant