Forum: Ruby on Rails newbie - Problem running unit test because of text column

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
vincent fazio (Guest)
on 2007-08-01 17:51
(Received via mailing list)
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

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
    CREATE TABLE strings (`id`   int(11) DEFAULT NULL auto_increment
PRIMARY KEY, `string` text

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?
This topic is locked and can not be replied to.