diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-27 20:46:07 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-03-27 20:46:07 -0700 |
commit | cf46c314e2909748b3a0319e3830c116fe6672da (patch) | |
tree | 9f8317610a85ef1e74b49ac08cbc329a03be6908 /activerecord/test/schema | |
parent | 0739d146bcd31247391d64b852885634d78e576d (diff) | |
parent | 9600e0b02973ce5dd36642511d542a6b62983a5e (diff) | |
download | rails-cf46c314e2909748b3a0319e3830c116fe6672da.tar.gz rails-cf46c314e2909748b3a0319e3830c116fe6672da.tar.bz2 rails-cf46c314e2909748b3a0319e3830c116fe6672da.zip |
Merge pull request #9944 from where/rebased-fulltext-spacial
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 |