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

Fix sequence from serial pre-condition validation for Postgresql #4613

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

filipelautert
Copy link
Collaborator

@filipelautert filipelautert commented Aug 7, 2023

Create a specific query for Postgresql, as sequences created by serial type are computed as autoincrement instead of normal sequence by SequenceSnapshotGenerator

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Create a specific query for Postgresql to be used by pre conditions as sequences created by serial type are computed as autoincrement instead of normal sequence by SequenceSnapshotGenerator

Additional Context

Fixes #1163

…l type are computed as autoincrement instead of normal sequence by SequenceSnapshotGenerator
@filipelautert filipelautert changed the title Create a specific query for Postgresql, as sequences created by seria… Create a specific query for Postgresql, as sequences created by serial type are computed as autoincrement instead of normal sequence by SequenceSnapshotGenerator Aug 7, 2023
@filipelautert filipelautert changed the title Create a specific query for Postgresql, as sequences created by serial type are computed as autoincrement instead of normal sequence by SequenceSnapshotGenerator Fix sequence from serial validation for Postgresql Aug 7, 2023
@filipelautert filipelautert changed the title Fix sequence from serial validation for Postgresql Fix sequence from serial pre-condition validation for Postgresql Aug 7, 2023
@MalloD12
Copy link
Contributor

MalloD12 commented Aug 8, 2023

I think it would be nice to add a changeset like this one:

<changeSet id="11" author="931@company.ru">
<preConditions onFail="MARK_RAN">
<not>
<sequenceExists sequenceName="analytics_queue_id_seq"/>
</not>
</preConditions>
<createSequence sequenceName="analytics_queue_id_seq" incrementBy="1" startValue="1" />
</changeSet>

To our root.changelog.xml from our Postgres integration tests.

@filipelautert filipelautert added this to the 1NEXT milestone Aug 28, 2023
@filipelautert filipelautert merged commit 195f0ae into master Aug 28, 2023
29 checks passed
@filipelautert filipelautert deleted the fix-issue-1163 branch August 28, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

PostgreSQL Precondition sequenceExists is not working.
3 participants