Rails Migration to make a column null => true -


i had created table column as

t.string   "email",  :default => "", :null => false 

the requirement has changed , need allow email null. how can write migration make :null => true

try:

change_column :table_name, :email, :string, :null => true 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -