Skip to content

Commit f333449

Browse files
committed
Demonstrate and test how expression indexes work.
1 parent e3aa7f7 commit f333449

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/cases/index_test_sqlserver.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,9 @@ class IndexTestSQLServer < ActiveRecord::TestCase
3939
end
4040
end
4141

42+
it 'add index with expression' do
43+
connection.execute "ALTER TABLE [testings] ADD [first_name_upper] AS UPPER([first_name])"
44+
connection.add_index 'testings', 'first_name_upper'
45+
end
46+
4247
end

0 commit comments

Comments
 (0)