diff options
author | Yaw Boakye <wheresyaw@gmail.com> | 2017-05-27 13:01:03 +0000 |
---|---|---|
committer | Yaw Boakye <wheresyaw@gmail.com> | 2017-05-29 09:54:10 +0000 |
commit | de387ea482bd72bab9e81db47cf7a5991f25117c (patch) | |
tree | fd889ab3e4738cae8324b531e8bfca41cb7b87d9 /activerecord/test/cases/test_case.rb | |
parent | 7a3db2ea15970e4c9c31a2b23303928aeadb391d (diff) | |
download | rails-de387ea482bd72bab9e81db47cf7a5991f25117c.tar.gz rails-de387ea482bd72bab9e81db47cf7a5991f25117c.tar.bz2 rails-de387ea482bd72bab9e81db47cf7a5991f25117c.zip |
`rename_table` renames primary key index name
Formerly, `rename_table` only renamed primary key index name if the
column's data type was sequential (serial, etc in PostgreSQL). The
problem with that is tables whose primary keys had other data types
(e.g. UUID) maintained the old primary key name. So for example,
if the `cats` table has a UUID primary key, and the table is renamed to
`felines`, the primary key index will still be called `cats_pkey`
instead of `felines_pkey`. This PR corrects it.
Diffstat (limited to 'activerecord/test/cases/test_case.rb')
0 files changed, 0 insertions, 0 deletions