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

Postgres SchemaManager is reading a default of -1 as (-1) for postgres 9.4 #2427

Closed
DeepDiver1975 opened this issue Jun 28, 2016 · 5 comments · Fixed by #2614
Closed

Postgres SchemaManager is reading a default of -1 as (-1) for postgres 9.4 #2427

DeepDiver1975 opened this issue Jun 28, 2016 · 5 comments · Fixed by #2614

Comments

@DeepDiver1975
Copy link
Contributor

Postgres 9.5
bildschirmfoto von 2016-06-28 14-12-49

Postgres 9.4
bildschirmfoto von 2016-06-28 14-12-29

Connected to a 9.4 server the default value is stored in the schema diff as (-1) but when comparing to a desired target schema where a -1 is expected a change is unnecessarily detected.

Is this something to be handled in the postgressql schema manager class?

THX

@DeepDiver1975
Copy link
Contributor Author

Original create statement

CREATE TABLE "oc_hmffile_locks" ("id" SERIAL NOT NULL, "lock" INT DEFAULT 0 NOT NULL, "key" VARCHAR(64) NOT NULL, "ttl" INT DEFAULT -1 NOT NULL, PRIMARY KEY("id"))

@deeky666
Copy link
Member

Hmmm is it an incompatibility between 9.4 and 9.5? Why is the default value stored as a literal in 9.5 but in 9.4 it is stored as an expression? How did you declare the default value in the DDL for the 9.5 table?

@deeky666
Copy link
Member

Patch provided in #2614

@Ocramius Ocramius modified the milestones: 2.6, 2.5.11 Feb 4, 2017
@Ocramius
Copy link
Member

Ocramius commented Feb 4, 2017

Can't fix in 2.5.x due to lack of Postgres94Platform. Gonna be a 2.6 only fix.

@Ocramius Ocramius changed the title Postgres SchemaManager is reading a default of -1 as (-1) for postgres 9.4 Postgres SchemaManager is reading a default of -1 as (-1) for postgres 9.4 Jul 22, 2017
@github-actions
Copy link

github-actions bot commented Aug 4, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.