activerecord-import/test/schema/mysql_schema.rb
Zach Dennis 5c287f1042 Added back in basic benchmark support. To run:
ruby benchmark/benchmark.rb --adapter mysql --num 1000
  ruby benchmark/benchmark.rb --adapter mysql --num 1000 --to-csv /tmp/results.csv
  ruby benchmark/benchmark.rb --adapter mysql --num 1000 --to-html /tmp/results.html
2010-04-08 23:12:28 -04:00

18 lines
630 B
Ruby

ActiveRecord::Schema.define do
create_table :books, :options=>'ENGINE=MyISAM', :force=>true do |t|
t.column :title, :string, :null=>false
t.column :publisher, :string, :null=>false, :default => 'Default Publisher'
t.column :author_name, :string, :null=>false
t.column :created_at, :datetime
t.column :created_on, :datetime
t.column :updated_at, :datetime
t.column :updated_on, :datetime
t.column :publish_date, :date
t.column :topic_id, :integer
t.column :for_sale, :boolean, :default => true
end
execute "ALTER TABLE books ADD FULLTEXT( `title`, `publisher`, `author_name` )"
end