I am new to Ruby on Rails and trying to achieve this:
I want to add a string column which is NOT NULL and holds the default value ''.
Here is my migration:
add_column :campaigns, :from_name, :string, limit: 100, :null => false, :defualt => ''
This migration works fine but when I see table in pgAdmin (PostgresQL) I see columns created but no default value:
from_name character varying(100) NOT NULL,
I tried same thing using pgAdmin and I could create
from_name character varying(100) NOT NULL DEFAULT ''::character varying,
What is wrong here??
:defualt". So unless that's a copy error I suggest that's your problem.