(0.3ms) BEGIN
SQL (0.8ms) INSERT INTO "databases" ("alias_name", "created_at", "created_by", "id", "name", "site_id", "type", "updated_at", "updated_by") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) [["alias_name", "name"], ["created_at", Wed, 17 Apr 2013 16:46:25 IST +05:30], ["created_by", nil], ["id", nil], ["name", "name"], ["site_id", 2], ["type", "Directory"], ["updated_at", Wed, 17 Apr 2013 16:46:25 IST +05:30], ["updated_by", nil]]
PG::Error: ERROR: null value in column "id" violates not-null constraint
: INSERT INTO "databases" ("alias_name", "created_at", "created_by", "id", "name", "site_id", "type", "updated_at", "updated_by") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
(0.2ms) ROLLBACK
ActiveRecord::StatementInvalid: PG::Error: ERROR: null value in column "id" violates not-null constraint
At the time of getting the error in the SQL the id is passing as nil. otherwise the id itself not passing.
In DB the id column is like not null default nextval('directories_id_seq'::regclass)
Rails - 3.1.3
Thanks,
Selva Chezhian
¤=๋●๋•என்றும் அன்புடன்●๋•=¤
Ƹ̵̡Ӝ̵̨̄Ʒ ●๋• செழியன் 007 ●๋• ♥ ツƸ̵̡Ӝ̵̨̄Ʒ
【✖ςサ∑zサⅰ∆и 007✖】