Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

fix table creation for postgresql #10

Closed
wants to merge 1 commit into from
Closed

Conversation

comboy
Copy link

@comboy comboy commented Apr 18, 2011

with definition

property :id, Serial

it was generating query like:

CREATE TABLE "foobars" ( SERIAL PRIMARY KEY, ... ,  PRIMARY KEY("id"))

while proper one should be:

CREATE TABLE "foobars" ( "id" SERIAL PRIMARY KEY, ... )

This fixes the issue.

with definition

  property :id, Serial

it was generating query like:

  CREATE TABLE "foobars" ( SERIAL PRIMARY KEY, ... ,  PRIMARY KEY("id"))

while proper one should be:

  CREATE TABLE "foobars" ( "id" SERIAL PRIMARY KEY, ... )

and it is now.
@xaviershay
Copy link

yes! Thank you this has been biting me. I'll look into the testing issue ... pretty sure I had them working. Try running them with bundle exec spec rather than rake maybe?

@xaviershay
Copy link

This appears to be already working on master using a different method, and I can't get a failing test. Please reopen if you can. /cc @ben_h

@xaviershay xaviershay closed this Aug 8, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants