diff --git a/spec/support/active_record/mysql2_setup.rb b/spec/support/active_record/mysql2_setup.rb index 6eba74f..2d6e451 100644 --- a/spec/support/active_record/mysql2_setup.rb +++ b/spec/support/active_record/mysql2_setup.rb @@ -1,6 +1,6 @@ require 'support/active_record/database_setup' require 'support/active_record/schema_setup' - +require 'support/active_record/mysql_schema_setup' module MySQL2Helper puts "Active Record #{ActiveRecord::VERSION::STRING}, mysql2" diff --git a/spec/support/active_record/mysql_schema_setup.rb b/spec/support/active_record/mysql_schema_setup.rb new file mode 100644 index 0000000..d7a3720 --- /dev/null +++ b/spec/support/active_record/mysql_schema_setup.rb @@ -0,0 +1,12 @@ +def active_record_load_schema + ActiveRecord::Schema.define do + create_table :users, :id => false, :force => true do |t| + t.column :id, "int(11) auto_increment PRIMARY KEY" + t.integer :name + end + + create_table :agents, :id => false, :force => true do |t| + t.integer :name + end + end +end diff --git a/spec/support/active_record/mysql_setup.rb b/spec/support/active_record/mysql_setup.rb index 4144d97..ba7a5ab 100644 --- a/spec/support/active_record/mysql_setup.rb +++ b/spec/support/active_record/mysql_setup.rb @@ -1,5 +1,6 @@ require 'support/active_record/database_setup' require 'support/active_record/schema_setup' +require 'support/active_record/mysql_schema_setup' module MySQLHelper puts "Active Record #{ActiveRecord::VERSION::STRING}, mysql"