With a simple migration:
create_table :test do |t|
t.string :test
t.string :test2, :default =>
end
The default value for test is 'NULL::character varying', not NULL.
The default value for test2 is (valid) if you run rake db:migrate, but if you run db:schema:load, it will be ::character varying'. The generated schema.rb is also invalid.
Postgresql says that the schema after rake db:schema:load is:
=# \d test
Table "public.test"
Column | Type | Modifiers
test | character varying(255) | default 'NULL::character varying'::character varying
test2 | character varying(255) | default ::character varying'::character varying
This is with postgresql 8.3.1, rails 2.0.2 and ruby-postgres 0.7.1 (Debian sid).