Skip to content

fix: Error if after the migration there are not null columns that are not part of the new schema#6519

Merged
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
erezrokah:fix/bring_back_not_null_validation
Jan 9, 2023
Merged

fix: Error if after the migration there are not null columns that are not part of the new schema#6519
kodiakhq[bot] merged 3 commits intocloudquery:mainfrom
erezrokah:fix/bring_back_not_null_validation

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

Bring back #6282 as the revert was not needed (see the fix #6466).

Also I fixed the issue with the tests, they were flaky not failing. The reason is that the separator length is based on the alter table statement. Since I use a random table name, I need to pad the table index to make it consistent.

Please note that without this fix, if we rename a primary key column the migration will succeed but the first sync will fail without a clear message on the reason of the failure.
Original issue #6248

@erezrokah erezrokah requested a review from yevgenypats as a code owner January 9, 2023 09:13
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Jan 9, 2023
@kodiakhq kodiakhq bot merged commit 566da52 into cloudquery:main Jan 9, 2023
kodiakhq bot pushed a commit that referenced this pull request Jan 10, 2023
🤖 I have created a release *beep* *boop*
---


## [2.0.5](plugins-destination-postgresql-v2.0.4...plugins-destination-postgresql-v2.0.5) (2023-01-10)


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](#6553)) ([392b848](392b848))
* Error if after the migration there are `not null` columns that are not part of the new schema ([#6519](#6519)) ([566da52](566da52))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants