Skip to content

Conversation

nunommc
Copy link

@nunommc nunommc commented Aug 20, 2014

For your reference the versions I have on my Gemfile.lock:

  • activerecord (4.1.5)
  • pg (0.17.1)

@nunommc
Copy link
Author

nunommc commented Sep 4, 2014

Please look at the commit where these files were changed

rails/rails@75a2e4a

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"primary key" and "identity" are not identical, this should be "integer primary key".

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To chime in with some of my initial experiences here:

  • The default serial primary key seems to cause ActiveRecord::StatementInvalid: PG::FeatureNotSupported: ERROR: Column "sequences.id" has unsupported type "serial". Why others don't get this, I don't know.
  • By using integer primary key as suggested by @aamine , I get: ActiveRecord::StatementInvalid: PG::InternalError: ERROR: Cannot insert a NULL value into column id - indicating that RDS is not auto-incrementing, and that perhaps I should be doing something for that application-side. Not sure what is actually recommended in this case.
  • With using @nunommc 's integer identity, I get ActiveRecord::UnknownPrimaryKey: Unknown primary key for table lists in model List. This is solved by adding to my models: self.primary_key = "id".

@aamine
Copy link
Owner

aamine commented Sep 8, 2014

Sorry for late response. This pull request seems good except noted points.

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.

3 participants