Sha256: 9384cc112d751ad027d576a5beec7c82aa22b023b69f0da22fe4218b1a93c3f4

Contents?: true

Size: 1.94 KB

Versions: 8

Compression:

Stored size: 1.94 KB

Contents

# setup database
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger.level = Logger::ERROR

config = {
  :adapter  => 'mysql',
  :database => 'property_sets_test',
  :username => 'root',
  :password => nil,
  :host     => '127.0.0.1',
  :port     => 3306
}

ActiveRecord::Base.establish_connection(config.merge(:database => nil))

# clear out everything
ActiveRecord::Base.connection.drop_database config[:database]
ActiveRecord::Base.connection.create_database config[:database], :charset => 'utf8', :collation => 'utf8_unicode_ci'

# connect and check
ActiveRecord::Base.establish_connection(config)
ActiveRecord::Base.connection.execute('select 1')

ActiveRecord::Migration.verbose = false

ActiveRecord::Schema.define(:version => 1) do
  create_table "account_settings", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_settings, [ :account_id, :name ], :unique => true

  create_table "account_texts", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_texts, [ :account_id, :name ], :unique => true

  create_table "account_validations", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_validations, [ :account_id, :name ], :unique => true

  create_table "account_typed_data", :force => true do |t|
    t.integer  "account_id"
    t.string   "name"
    t.string   "value"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index :account_typed_data, [ :account_id, :name ], :unique => true

  create_table "accounts", :force => true do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
property_sets-2.0.0 test/database.rb
property_sets-1.0.5 test/database.rb
property_sets-1.0.4 test/database.rb
property_sets-1.0.0 test/database.rb
property_sets-0.8.3 test/database.rb
property_sets-0.8.2 test/database.rb
property_sets-0.8.1 test/database.rb
property_sets-0.8.0 test/database.rb