diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-06-25 15:49:15 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-26 00:59:38 +0200 |
commit | 4464d10e68045e6723d4eb62734213c4296ef339 (patch) | |
tree | 9948b1a88361fb0867a96cfbcef4e226b8984bc2 /activerecord/test | |
parent | 65aa6a7db16b7387d5a3bf1ad7f5a602804a2f21 (diff) | |
download | rails-4464d10e68045e6723d4eb62734213c4296ef339.tar.gz rails-4464d10e68045e6723d4eb62734213c4296ef339.tar.bz2 rails-4464d10e68045e6723d4eb62734213c4296ef339.zip |
index dump should not include full text indexes. Thanks Ken Mayer for the original patch! [#4949 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/schema_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/schema_test.rb b/activerecord/test/cases/adapters/postgresql/schema_test.rb index 3ed9b1974d..a5c3e69af9 100644 --- a/activerecord/test/cases/adapters/postgresql/schema_test.rb +++ b/activerecord/test/cases/adapters/postgresql/schema_test.rb @@ -9,9 +9,11 @@ class SchemaTest < ActiveRecord::TestCase CAPITALIZED_TABLE_NAME = 'Things' INDEX_A_NAME = 'a_index_things_on_name' INDEX_B_NAME = 'b_index_things_on_different_columns_in_each_schema' + INDEX_C_NAME = 'c_index_full_text_search' INDEX_A_COLUMN = 'name' INDEX_B_COLUMN_S1 = 'email' INDEX_B_COLUMN_S2 = 'moment' + INDEX_C_COLUMN = %q{(to_tsvector('english', coalesce(things.name, '')))} COLUMNS = [ 'id integer', 'name character varying(50)', @@ -45,6 +47,8 @@ class SchemaTest < ActiveRecord::TestCase @connection.execute "CREATE INDEX #{INDEX_A_NAME} ON #{SCHEMA2_NAME}.#{TABLE_NAME} USING btree (#{INDEX_A_COLUMN});" @connection.execute "CREATE INDEX #{INDEX_B_NAME} ON #{SCHEMA_NAME}.#{TABLE_NAME} USING btree (#{INDEX_B_COLUMN_S1});" @connection.execute "CREATE INDEX #{INDEX_B_NAME} ON #{SCHEMA2_NAME}.#{TABLE_NAME} USING btree (#{INDEX_B_COLUMN_S2});" + @connection.execute "CREATE INDEX #{INDEX_C_NAME} ON #{SCHEMA_NAME}.#{TABLE_NAME} USING gin (#{INDEX_C_COLUMN});" + @connection.execute "CREATE INDEX #{INDEX_C_NAME} ON #{SCHEMA2_NAME}.#{TABLE_NAME} USING gin (#{INDEX_C_COLUMN});" end def teardown |