aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/support/ddl_helper.rb
blob: 0107babaaf6c5af2a4dc28b2dd6be6d30a52005f (plain) (blame)
1
2
3
4
5
6
7
8
module DdlHelper
  def with_example_table(connection, table_name, definition = nil)
    connection.exec_query("CREATE TABLE #{table_name}(#{definition})")
    yield
  ensure
    connection.exec_query("DROP TABLE #{table_name}")
  end
end