rubyonrailsin

A Ruby and Rails talk

Tuesday, March 23, 2010


[Rails] change column to allow null

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

how do I change the column in a table to allow null?

I have

change_column :docs, :orga, :null


in my migration file but I get an error:

Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near 'null DEFAULT '' NOT NULL' at line 1: ALTER TABLE `docs`
CHANGE `orga` `orga null DEFAULT '' NOT NULL

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive