Displaying 2 results from an estimated 2 matches for "new_default".
Did you mean:
net_default
2006 May 03
4
default values
Hello,
I''m working with a postgresql table
CREATE TABLE elements (
id serial primary key,
c1 text default f1(),
...
cN text default fN()
);
But if I use de lines
@element = Element.new
@element.save
the values that element take are the nextval in the id field and nules in
all the other fields.
How can I get the defaults?
(but without rewriting the
2006 Mar 28
8
Rails 1.1: not-null constraint violations
Since upgrading to Rails 1.1, I now get these errors:
PGError: ERROR: null value in column "added" violates not-null
constraint
: INSERT INTO authors ("added", ...) VALUES(NULL, ...)
The ''added'' column has a default of current_timestamp, and this used to
work fine with Rails 1.0. Are we supposed to put default values in
models'' before_create or