mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove duplicated table_exists?
`table_exists?` is already exist in `ModelSchema`.
5cab344494/activerecord/lib/active_record/model_schema.rb (L339-L341)
This commit is contained in:
parent
75eb3d0cec
commit
c5ecc338e8
2 changed files with 0 additions and 8 deletions
|
@ -28,10 +28,6 @@ module ActiveRecord
|
||||||
where(key: key).pluck(:value).first
|
where(key: key).pluck(:value).first
|
||||||
end
|
end
|
||||||
|
|
||||||
def table_exists?
|
|
||||||
connection.table_exists?(table_name)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Creates an internal metadata table with columns +key+ and +value+
|
# Creates an internal metadata table with columns +key+ and +value+
|
||||||
def create_table
|
def create_table
|
||||||
unless table_exists?
|
unless table_exists?
|
||||||
|
|
|
@ -22,10 +22,6 @@ module ActiveRecord
|
||||||
"#{table_name_prefix}#{schema_migrations_table_name}#{table_name_suffix}"
|
"#{table_name_prefix}#{schema_migrations_table_name}#{table_name_suffix}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def table_exists?
|
|
||||||
connection.table_exists?(table_name)
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_table
|
def create_table
|
||||||
unless table_exists?
|
unless table_exists?
|
||||||
version_options = connection.internal_string_options_for_primary_key
|
version_options = connection.internal_string_options_for_primary_key
|
||||||
|
|
Loading…
Reference in a new issue