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

chore(dao) modify postgres for bdr compatibility #2672

Merged
merged 1 commit into from
Jul 6, 2017

Conversation

AlexBloor
Copy link
Contributor

Summary

This change helps support compatibility with BDR.
Kong performs postgres database migrations on start-up.
Postgres logs an error when postgres.lua calls ALTER TABLE … DEFAULT.
Per the BDR docs, ALTER TABLE ... DEFAULT is not supported by BDR.
However, it can be rewritten into a short sequence that is supported.
This commit replaces the one command with the short sequence.

http://bdr-project.org/docs/0.9/ddl-replication-statements.html

Full changelog

  • [Implement restructured postgreSQL commands in kong/dao/migrations/postgres.lua]

Issues resolved

Fix #2671

This change helps support compatibility with BDR.
Kong performs postgres database migrations on start-up.
Postgres logs an error when postgres.lua calls ALTER TABLE … DEFAULT.
Per the BDR docs, ALTER TABLE ... DEFAULT is not supported by BDR.
However, it can be rewritten into a short sequence that is supported.
This commit replaces the one command with the short sequence.

http://bdr-project.org/docs/0.9/ddl-replication-statements.html
@p0pr0ck5
Copy link
Contributor

p0pr0ck5 commented Jul 6, 2017

LGTM, though I'm not sure if this should target master or next (typically migrations are only released on next, but since this is just a minor update, not a new migration, I don't know if we need to follow this pattern here). @Tieske thoughts?

@thibaultcha
Copy link
Member

This is not a new migration, but an improvement on a current one, so master is the right candidate.

@thibaultcha thibaultcha merged commit 8fa795c into Kong:master Jul 6, 2017
@AlexBloor AlexBloor deleted the chore/bdr-compatible-migrations branch July 7, 2017 18:22
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 this pull request may close these issues.

Postgres BDR Prevents Kong Migrations on Startup
3 participants