diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-10-15 23:22:33 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-15 23:22:33 +0900 |
commit | 8877492df2853cba92d95dabdfcdee7244e7d8f0 (patch) | |
tree | 4984505322d0a3451d4a6bb99e7ad30558a45ca1 /activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | |
parent | 26f995459cdfce5c8231f47b369d224e00c7a22c (diff) | |
download | rails-8877492df2853cba92d95dabdfcdee7244e7d8f0.tar.gz rails-8877492df2853cba92d95dabdfcdee7244e7d8f0.tar.bz2 rails-8877492df2853cba92d95dabdfcdee7244e7d8f0.zip |
Fix longer sequence name detection for serial columns (#28339)
We already found the longer sequence name, but we could not consider
whether it was the sequence name created by serial type due to missed a
max identifier length limitation. I've addressed the sequence name
consideration to respect the max identifier length.
Fixes #28332.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | 3 |
1 files changed, 2 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 9e2f61e6ce..79cb4e276d 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -617,7 +617,8 @@ module ActiveRecord table_name, default_function, collation, - comment: comment.presence + comment: comment.presence, + max_identifier_length: max_identifier_length ) end |