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
[LB-1373] fixed precision for time type for PostgreSQL #1894
Conversation
Thanks @KushnirykOleh for creating the fix. |
➤ Steven Massaro commented: Erzsebet Carmean Nathan Voxland Surya Aki This ticket is dev complete. This PR fixes the issue and I’ve verified it. This is ready for QA sizing. |
➤ Erzsebet Carmean commented: Liquibase Core: master/812/1e5e49/2021-11-18 13:23+0000, Pro: master/146/bfaa6a/2021-11-19T05:05:28Z] #812Build: https://github.com/liquibase/liquibase/actions/runs/1478003258 ( https://github.com/liquibase/liquibase/actions/runs/1478003258 )
Manual Tests Verify update-sql correctly generates Postgres SQL to create columns of datatype TIMEZONE with varying precision. liquibase update-sql --changelog-file lb1798-changelog.xml
Verify a successful update of a Postgres database to create a table with TIMEZONE and precision datatype columns. liquibase update --changelog-file lb1798-changelog.xml
Verify generate-changelog includes a createTable changeset with TIMEZONE datatype columns. liquibase generate-changelog --changelog-file gcl-1798-changelog.xml
|
I fixed up the time precision handling |
This PR addresses issues related to snapshotting precision for Postgres
Verify update-sql correctly generates Postgres SQL to create columns of datatype TIMEZONE with varying precision. PASS
Verify a successful update of a Postgres database to create a table with TIMEZONE and precision datatype columns. PASS
Verify generate-changelog includes a createTable changeset with TIMEZONE datatype columns. PASS
Test Environment |
Environment
Liquibase Version: 4.3.5
Liquibase Integration & Version:
Liquibase Extension(s) & Version:
Database Vendor & Version: postgres 9-13
Operating System Type & Version: MacOS Big Sur 11.4
Pull Request Type
closes #1774
https://datical.atlassian.net/browse/LB-1373
Description
Precision in changeSet for Time Datatype was missing for PostreSQL in generated query (and in DB column properties respectfully)
Steps To Reproduce
create xml changelog with next changeset
Run Liquibase
updateSQL
command to observe SQL generated for changeLog, notice precision for time is missingActual Behavior
for mentioned changeSet Liquibase generated query like this
with missing precision argument
Expected/Desired Behavior
With this fix for mentioned changeSet Liquibase generates query like this
Run changeSet against PostgreSQL DB and check column properties - it also shows precision
Test Requirements (Liquibase Internal QA)
Prior to manual testing:
Manual Tests
The manual tests need only be executed against one version of Postgres.
Verify update-sql correctly generates Postgres SQL to create columns of datatype TIMEZONE with varying precision.
liquibase update-sql --changelog-file lb1798-changelog.xml
time
datatype; ietime(3)
.WITHOUT TIME ZONE
Verify a successful update of a Postgres database to create a table with TIMEZONE and precision datatype columns.
liquibase update --changelog-file lb1798-changelog.xml
time
datatype; ietime(3)
.WITHOUT TIME ZONE
Verify generate-changelog includes a createTable changeset with TIMEZONE datatype columns.
liquibase generate-changelog --changelog-file gcl-1798-changelog.xml
time
datatype; ietime(3)
.WITHOUT TIME ZONE
Automated Tests
Fast Track PR Acceptance Checklist:
┆Issue is synchronized with this Jira Bug by Unito