1
0
Fork 0
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:
Ryuta Kamizono 2019-06-11 04:27:15 +09:00
parent 75eb3d0cec
commit c5ecc338e8
2 changed files with 0 additions and 8 deletions

View file

@ -28,10 +28,6 @@ module ActiveRecord
where(key: key).pluck(:value).first
end
def table_exists?
connection.table_exists?(table_name)
end
# Creates an internal metadata table with columns +key+ and +value+
def create_table
unless table_exists?

View file

@ -22,10 +22,6 @@ module ActiveRecord
"#{table_name_prefix}#{schema_migrations_table_name}#{table_name_suffix}"
end
def table_exists?
connection.table_exists?(table_name)
end
def create_table
unless table_exists?
version_options = connection.internal_string_options_for_primary_key