Skip to content

Commit

Permalink
Remove duplicated table_exists?
Browse files Browse the repository at this point in the history
  • Loading branch information
kamipo committed Jun 13, 2019
1 parent 75eb3d0 commit c5ecc33
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions activerecord/lib/active_record/internal_metadata.rb
Expand Up @@ -28,10 +28,6 @@ def [](key)
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?
Expand Down
4 changes: 0 additions & 4 deletions activerecord/lib/active_record/schema_migration.rb
Expand Up @@ -22,10 +22,6 @@ def table_name
"#{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
Expand Down

0 comments on commit c5ecc33

Please sign in to comment.