У меня проблема с модификаторами по умолчанию в postgres 8.4. (Я думаю, что версия не важна) У меня debian ubuntu. Когда Im создавая миграции на рельсах AR:значения по умолчанию/модификаторы в postgres?
class CreateUserMails < ActiveRecord::Migration
def self.up
create_table :user_mails do |t|
t.string :title, :limit=> 128, :default=> ''
t.string :place, :limit=> 32, :default=> ''
t.text :message
t.timestamps
end
end
def self.down
drop_table :user_mails
end
end
на Postgres его вида:
Column | Type | Modifiers
--------------+-----------------------------+---------------------------------------------------------
id | integer | not null default nextval('user_mails_id_seq'::regclass)
title | character varying(128) | default ''::character varying
place | character varying(32) | default ''::character varying
message | text |
created_at | timestamp without time zone |
updated_at | timestamp without time zone |
нет на консоли в качестве значения по умолчанию Im получение
ит = UserMail.new => # UserMail id: nil, title: "'' :: character differenting", place: "'' :: character differenting", message: nil, created_at: nil, updated_at: nil
d oes кто-нибудь знает, как я могу удалить эти модификаторы и оставить только «или любое значение по умолчанию без: :: меняющего характера?