Remove deprecated methods from ActiveRecord::ConnectionAdapters::DatabaseLimits
This commit is contained in:
parent
cbf43df288
commit
426967c6f5
@ -1,3 +1,15 @@
|
||||
* Remove deprecated methods from `ActiveRecord::ConnectionAdapters::DatabaseLimits`.
|
||||
|
||||
`column_name_length`
|
||||
`table_name_length`
|
||||
`columns_per_table`
|
||||
`indexes_per_table`
|
||||
`columns_per_multicolumn_index`
|
||||
`sql_query_length`
|
||||
`joins_per_query`
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
||||
* Remove deprecated `ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_multi_insert?`.
|
||||
|
||||
*Rafael Mendonça França*
|
||||
|
@ -12,18 +12,6 @@ def table_alias_length
|
||||
max_identifier_length
|
||||
end
|
||||
|
||||
# Returns the maximum length of a column name.
|
||||
def column_name_length
|
||||
max_identifier_length
|
||||
end
|
||||
deprecate :column_name_length
|
||||
|
||||
# Returns the maximum length of a table name.
|
||||
def table_name_length
|
||||
max_identifier_length
|
||||
end
|
||||
deprecate :table_name_length
|
||||
|
||||
# Returns the maximum allowed length for an index name. This
|
||||
# limit is enforced by \Rails and is less than or equal to
|
||||
# #index_name_length. The gap between
|
||||
@ -39,24 +27,6 @@ def index_name_length
|
||||
max_identifier_length
|
||||
end
|
||||
|
||||
# Returns the maximum number of columns per table.
|
||||
def columns_per_table
|
||||
1024
|
||||
end
|
||||
deprecate :columns_per_table
|
||||
|
||||
# Returns the maximum number of indexes per table.
|
||||
def indexes_per_table
|
||||
16
|
||||
end
|
||||
deprecate :indexes_per_table
|
||||
|
||||
# Returns the maximum number of columns in a multicolumn index.
|
||||
def columns_per_multicolumn_index
|
||||
16
|
||||
end
|
||||
deprecate :columns_per_multicolumn_index
|
||||
|
||||
# Returns the maximum number of elements in an IN (x,y,z) clause.
|
||||
# +nil+ means no limit.
|
||||
def in_clause_length
|
||||
@ -64,18 +34,6 @@ def in_clause_length
|
||||
end
|
||||
deprecate :in_clause_length
|
||||
|
||||
# Returns the maximum length of an SQL query.
|
||||
def sql_query_length
|
||||
1048575
|
||||
end
|
||||
deprecate :sql_query_length
|
||||
|
||||
# Returns maximum number of joins in a single query.
|
||||
def joins_per_query
|
||||
256
|
||||
end
|
||||
deprecate :joins_per_query
|
||||
|
||||
private
|
||||
def bind_params_length
|
||||
65535
|
||||
|
@ -332,34 +332,6 @@ def test_select_methods_passing_a_relation
|
||||
assert_equal "special_db_type", @connection.type_to_sql(:special_db_type)
|
||||
end
|
||||
|
||||
def test_column_name_length_is_deprecated
|
||||
assert_deprecated { @connection.column_name_length }
|
||||
end
|
||||
|
||||
def test_table_name_length_is_deprecated
|
||||
assert_deprecated { @connection.table_name_length }
|
||||
end
|
||||
|
||||
def test_columns_per_table_is_deprecated
|
||||
assert_deprecated { @connection.columns_per_table }
|
||||
end
|
||||
|
||||
def test_indexes_per_table_is_deprecated
|
||||
assert_deprecated { @connection.indexes_per_table }
|
||||
end
|
||||
|
||||
def test_columns_per_multicolumn_index_is_deprecated
|
||||
assert_deprecated { @connection.columns_per_multicolumn_index }
|
||||
end
|
||||
|
||||
def test_sql_query_length_is_deprecated
|
||||
assert_deprecated { @connection.sql_query_length }
|
||||
end
|
||||
|
||||
def test_joins_per_query_is_deprecated
|
||||
assert_deprecated { @connection.joins_per_query }
|
||||
end
|
||||
|
||||
def test_allowed_index_name_length_is_deprecated
|
||||
assert_deprecated { @connection.allowed_index_name_length }
|
||||
end
|
||||
|
@ -149,6 +149,16 @@ Please refer to the [Changelog][active-record] for detailed changes.
|
||||
|
||||
### Removals
|
||||
|
||||
* Remove deprecated methods from `ActiveRecord::ConnectionAdapters::DatabaseLimits`.
|
||||
|
||||
`column_name_length`
|
||||
`table_name_length`
|
||||
`columns_per_table`
|
||||
`indexes_per_table`
|
||||
`columns_per_multicolumn_index`
|
||||
`sql_query_length`
|
||||
`joins_per_query`
|
||||
|
||||
* Remove deprecated `ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_multi_insert?`.
|
||||
|
||||
* Remove deprecated `ActiveRecord::ConnectionAdapters::AbstractAdapter#supports_foreign_keys_in_create?`.
|
||||
|
Loading…
Reference in New Issue
Block a user