diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-05-12 12:09:02 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-05-12 12:09:02 +0200 |
commit | f25f5336ee07cc42207dc036d1a962b500969d10 (patch) | |
tree | 0581a037d8e491c0a66b433c9ef60c5ad901b19a /activerecord/lib | |
parent | 5b73405f2e78db94235de49bd2c297c60892bbcd (diff) | |
parent | c0a12453418356a837c3f62709fac6fe948047a6 (diff) | |
download | rails-f25f5336ee07cc42207dc036d1a962b500969d10.tar.gz rails-f25f5336ee07cc42207dc036d1a962b500969d10.tar.bz2 rails-f25f5336ee07cc42207dc036d1a962b500969d10.zip |
Merge pull request #10505 from patricksrobertson/bigserial_id_not_identifying_pk
Handle other pk types in PostgreSQL gracefully.
Closes #10505.
- rebased
- test slightly modified
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb index e7169bd357..d26e0b7635 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -12,7 +12,7 @@ module ActiveRecord def visit_ColumnDefinition(o) sql = super - if o.primary_key? && o.type == :uuid + if o.primary_key? && o.type != :primary_key sql << " PRIMARY KEY " add_column_options!(sql, column_options(o)) end |