Displaying 2 results from an estimated 2 matches for "current_database".
2007 Jan 26
1
rake test:x recreates tables in MySQL with server (not database) charset and collation
Any thoughts on how to avoid this problem? Already tried:
1. Setting the charset and collation in migration 001 - no effect:
def self.up
db_name = ActiveRecord::Base::connection.current_database()
execute "ALTER DATABASE #{db_name} CHARACTER SET utf8 COLLATE
utf8_bin"
end
2. Setting the charset and collation on each table individually - no
effect:
{:options=>"engine=InnoDB CHARACTER SET utf8 COLLATE utf8_bin"}
Note that development and production environme...
2006 May 15
11
can you explain this benchmark?
I want to load about 14000 words (a subset of /usr/share/dict/words)
into a MySQL table in a migration:
class CreateWords < ActiveRecord::Migration
def self.up
create_table :words, :force => true do |t|
t.column :word, :string
end
say_with_time ''loading words...'' do
words = File.join(RAILS_ROOT, ''db'',