Sha256: 065166d607de086e7889dd60a355feb855e2937be30314886a78ddcdc545d82d

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

DB = YAML::load(File.open(File.join(File.dirname(__FILE__), 'database.yml'))).symbolize_keys!
ActiveRecord::Base.establish_connection(DB[:source])

TABLES = %w(mains seconds)

TABLES.each do |t|
  ActiveRecord::Base.connection.execute("drop table if exists #{t};")
end

TABLES.each do |t|
  ActiveRecord::Base.connection.execute("create table #{t} (id integer, val integer, seconds_id integer, mains_id integer, created_at datetime default null);")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inequal_opportunity-0.2.1 test/db_setup.rb
inequal_opportunity-0.2.0 test/db_setup.rb