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

Migration fails with PGSql adapter error on some environments #191

Closed
ezr-ondrej opened this issue Sep 17, 2021 · 0 comments · Fixed by #192
Closed

Migration fails with PGSql adapter error on some environments #191

ezr-ondrej opened this issue Sep 17, 2021 · 0 comments · Fixed by #192

Comments

@ezr-ondrej
Copy link
Member

From: https://community.theforeman.org/t/tfm-rubygem-foreman-puppet-noarch-db-migrate-error/25322

ActiveRecord::ConnectionAdapters::PostgreSQLAdapter does not support skipping duplicates
Which points to badly configrued Postgresql, but we cant do anything about it, so we should try fixing it for such environments.

Probably relevant: rails-sqlserver/activerecord-sqlserver-adapter#847

ezr-ondrej added a commit to ezr-ondrej/foreman_puppet that referenced this issue Sep 17, 2021
If we do not force inserts, Rails tries to skip duplicates, which is not supported on some environments.
This makes the migration flaky and fail on badly configured environmets for no reason.

Fixes theforeman#191
ezr-ondrej added a commit that referenced this issue Sep 17, 2021
If we do not force inserts, Rails tries to skip duplicates, which is not supported on some environments.
This makes the migration flaky and fail on badly configured environmets for no reason.

Fixes #191
ezr-ondrej added a commit that referenced this issue Sep 17, 2021
If we do not force inserts, Rails tries to skip duplicates, which is not supported on some environments.
This makes the migration flaky and fail on badly configured environmets for no reason.

Fixes #191

(cherry picked from commit 115599b)
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

Successfully merging a pull request may close this issue.

1 participant