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/column.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/column.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/column.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb index 16273fb5f1..28d949b503 100644 --- a/activerecord/lib/active_record/connection_adapters/column.rb +++ b/activerecord/lib/active_record/connection_adapters/column.rb @@ -15,7 +15,7 @@ module ActiveRecord # +default+ is the type-casted default value, such as +new+ in <tt>sales_stage varchar(20) default 'new'</tt>. # +sql_type_metadata+ is various information about the type of the column # +null+ determines if this column allows +NULL+ values. - def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil, default_function = nil, collation = nil, comment: nil) + def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil, default_function = nil, collation = nil, comment: nil, **) @name = name.freeze @table_name = table_name @sql_type_metadata = sql_type_metadata |