lib/tasks/tw.rake
# True if the table exists in the present environment's database
True if the table exists in the present environment's database
True if the table exists in the present environment ' s database
def table_exists(table_name)
    ApplicationRecord.connection
      .execute("SELECT EXISTS(SELECT * FROM information_schema.tables " \
               "WHERE table_name = '#{table_name}');").first['exists'] == 't'
  end
def table_exists ( table_name ) ApplicationRecord . connection . execute ( "SELECT EXISTS(SELECT * FROM information_schema.tables " "WHERE table_name = '#{table_name}');" ) . first [ 'exists' ] == 't' end
True if the table exists in the present environment's database
True if the table exists in the present environment ' s database
table_name
<not_specific>