Skip to content

Commit e576fcc

Browse files
committed
Update README to direct SQL Server 2005 users on how to customize their native_text_database_type away from varchar(max).
1 parent b56f09c commit e576fcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To pass the ActiveRecord tests we had to implement an class accessor for the nat
5858
* SQL Server 2000 is 'text'
5959
* SQL Server 2005 is 'varchar(max)'
6060

61-
During testing this type is set to 'varchar(8000)' for both versions. The reason is that rails expects to be able to use SQL = operators on text data types and this is not possible with a native 'text' data type in SQL Server. The default 'varchar(max)' for SQL Server 2005 can be queried using the SQL = operator and has plenty of storage space which is why we made it the default for 2005. If for some reason you want to change the data type created during migrations for any SQL Server version, you can include this line in your environment.rb file.
61+
During testing this type is set to 'varchar(8000)' for both versions. The reason is that rails expects to be able to use SQL = operators on text data types and this is not possible with a native 'text' data type in SQL Server. The default 'varchar(max)' for SQL Server 2005 can be queried using the SQL = operator and has plenty of storage space which is why we made it the default for 2005. If for some reason you want to change the data type created during migrations for any SQL Server version, you can configure this line to your liking in a config/initializer file.
6262

6363
ActiveRecord::ConnectionAdapters::SQLServerAdapter.native_text_database_type = 'varchar(8000)'
6464

0 commit comments

Comments
 (0)