# Newbie - Problem running unit test because of text column

**URL:** <https://www.ruby-forum.com/t/newbie-problem-running-unit-test-because-of-text-column/110968>\
**Category:** Rails\
**Created:** [August 1, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/newbie-problem-running-unit-test-because-of-text-column/110968 "2007-08-01T15:51:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent\_fazio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/f0a364/32.png) [@vincent\_fazio](https://www.ruby-forum.com/u/vincent_fazio)\
**Post date:** [August 1, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/newbie-problem-running-unit-test-because-of-text-column/110968/1 "2007-08-01T15:51:32Z")

</div>

I’m new to Ruby and Rails and I’m having a problem. I’ve creates a  
ruby schema file defining a table containing a text column. I am able  
to migrate this table to a MySQL database with no problem.

Here is the table definition from my migration file.

```
create_table "strings", :force => true do |t|
  t.column "string", :text, :null => false
end

```

However, when I try to run the Rake target to run my unit tests, I  
get the following error.

Mysql::Error: #42000BLOB/TEXT column ‘string’ can’t have a default  
value:  
CREATE TABLE strings (`id` int(11) DEFAULT NULL auto\_increment  
PRIMARY KEY, `string` text  
DEFAULT ‘’ NOT NULL) ENGINE=InnoDB

Can anone tell me what’s going on here? I can figure out how to get  
the DEFAULT ‘’ out of the generated SQL. Again, this does not happen  
when I run migrations. Does it use different code?
