diff options
author | Ken Mazaika <kenmazaika@gmail.com> | 2013-03-27 00:30:11 -0400 |
---|---|---|
committer | Ken Mazaika <kenmazaika@gmail.com> | 2013-03-27 23:35:54 -0400 |
commit | 9600e0b02973ce5dd36642511d542a6b62983a5e (patch) | |
tree | 9f8317610a85ef1e74b49ac08cbc329a03be6908 /activerecord/test/schema | |
parent | 0739d146bcd31247391d64b852885634d78e576d (diff) | |
download | rails-9600e0b02973ce5dd36642511d542a6b62983a5e.tar.gz rails-9600e0b02973ce5dd36642511d542a6b62983a5e.tar.bz2 rails-9600e0b02973ce5dd36642511d542a6b62983a5e.zip |
Add support for FULLTEXT and SPATIAL indexes using the :type flag for MySQL.
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/mysql2_specific_schema.rb | 10 | ||||
-rw-r--r-- | activerecord/test/schema/mysql_specific_schema.rb | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb index f25f72c481..1b1457ab9c 100644 --- a/activerecord/test/schema/mysql2_specific_schema.rb +++ b/activerecord/test/schema/mysql2_specific_schema.rb @@ -14,6 +14,16 @@ ActiveRecord::Schema.define do add_index :binary_fields, :var_binary + create_table :key_tests, force: true, :options => 'ENGINE=MyISAM' do |t| + t.string :awesome + t.string :pizza + t.string :snacks + end + + add_index :key_tests, :awesome, :type => :fulltext, :name => 'index_key_tests_on_awesome' + add_index :key_tests, :pizza, :using => :btree, :name => 'index_key_tests_on_pizza' + add_index :key_tests, :snacks, :name => 'index_key_tests_on_snack' + ActiveRecord::Base.connection.execute <<-SQL DROP PROCEDURE IF EXISTS ten; SQL diff --git a/activerecord/test/schema/mysql_specific_schema.rb b/activerecord/test/schema/mysql_specific_schema.rb index 5401c12ed5..ecdce1519b 100644 --- a/activerecord/test/schema/mysql_specific_schema.rb +++ b/activerecord/test/schema/mysql_specific_schema.rb @@ -14,6 +14,16 @@ ActiveRecord::Schema.define do add_index :binary_fields, :var_binary + create_table :key_tests, force: true, :options => 'ENGINE=MyISAM' do |t| + t.string :awesome + t.string :pizza + t.string :snacks + end + + add_index :key_tests, :awesome, :type => :fulltext, :name => 'index_key_tests_on_awesome' + add_index :key_tests, :pizza, :using => :btree, :name => 'index_key_tests_on_pizza' + add_index :key_tests, :snacks, :name => 'index_key_tests_on_snack' + ActiveRecord::Base.connection.execute <<-SQL DROP PROCEDURE IF EXISTS ten; SQL |