# SqlServer Activerecord Adaptor + VARCHAR(MAX) Woes

**URL:** <https://www.ruby-forum.com/t/sqlserver-activerecord-adaptor-varchar-max-woes/137524>\
**Category:** Rails\
**Created:** [May 13, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/sqlserver-activerecord-adaptor-varchar-max-woes/137524 "2008-05-13T23:26:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenatron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/94ad74/32.png) [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Post date:** [May 13, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/sqlserver-activerecord-adaptor-varchar-max-woes/137524/1 "2008-05-13T23:26:14Z")

</div>

I seem to be running into various issues between SqlServer and Rails,  
and so far have been able to solve everything save for a particular  
quirk when running unit tests.

When I run “rake test:units” on my app, it gets so far as to run  
db:schema:load. I’m dealing with a legacy database, so it’s loading all  
sorts of tables that I don’t care about, but regardless, one table in  
particular has a column set to VARCHAR(MAX). db:schema:dump interprets  
“MAX” as a limit of -1.

Is there a way to set the limit information during the schema dump? I’d  
be happy with just setting it to 8000 instead of MAX for testing  
purposes.

I suppose at the very least, I’d like to specify the schema.rb file  
myself without rake running db:schema:dump and overwriting my changes.
