This project is archived and is in readonly mode.

#2683 ✓resolved

Postgres: Invalid default value getting from character varying columns.

Reported by foot | May 20th, 2009 @ 08:00 PM | in 3.x

Migrating script:

    create_table "order_users", :force => true do |t|

  t.string   "username",      :limit => 50
  t.string   "email_address", :limit => 50, :default => "test1", :null => false
  t.string   "password",      :limit => 20
  t.datetime "created_on"
  t.string   "first_name",    :limit => 50, :default => "test2", :null => false
  t.string   "last_name",     :limit => 50, :default => "test3", :null => false

Creating new object:

=> #<OrderUser id: nil, username: nil, email_address: "'test1'::character varying", password: nil, created_on: nil, first_name: "'test2'::character varying", last_name: "'test3'::character varying">

Rails 2.3.2
Postgresql 8.3.7
postgres gem (

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>