# Switching from VARCHAR(255) to a blob

**URL:** <https://www.ruby-forum.com/t/switching-from-varchar-255-to-a-blob/141643>\
**Category:** Rails\
**Created:** [June 28, 2008, 3:10am UTC](https://www.ruby-forum.com/t/switching-from-varchar-255-to-a-blob/141643 "2008-06-28T03:10:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skirkpatrick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/73ab20/32.png) [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Post date:** [June 28, 2008, 3:10am UTC](https://www.ruby-forum.com/t/switching-from-varchar-255-to-a-blob/141643/1 "2008-06-28T03:10:57Z")

</div>

i have a comments thread setup but i initial set the datatype to  
VARCHAR(255).

if i wanted to allow users to post more than 256 characters…what is  
the best way to do this?

should i change the data type to a blob? would this corrupt all current  
data in the comments?

---

<div class="post-metadata">

**Author:** ![skirkpatrick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/73ab20/32.png) [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Post date:** [June 28, 2008, 8:20am UTC](https://www.ruby-forum.com/t/switching-from-varchar-255-to-a-blob/141643/2 "2008-06-28T08:20:07Z")

</div>

On Jun 27, 2008, at 6:10 PM, Scott K. wrote:

> i have a comments thread setup but i initial set the datatype to  
> VARCHAR(255).
> 
> if i wanted to allow users to post more than 256 characters…what is  
> the best way to do this?
> 
> should i change the data type to a blob? would this corrupt all  
> current  
> data in the comments?

Change to it to TEXT and optionally set a maximum size, otherwise the  
default is 64K I believe (for MySQL that is).

– gw
