I see what went wrong here.  I accidentally dropped the umrestricted table
in my dev5 area and when I recreated it, I did not create a primary key. I
just created it using these commands, and all seems good now.

create table umrestricted (id integer primary key default
nextval(('umrestricted_seq'::text)::regclass), item_id integer,
release_date timestamp);

create sequence umrestricted_seq start 1;



On Mon, Mar 16, 2020 at 10:12 PM Jose Blanco <[email protected]> wrote:

> I have two development areas - one for our dev5.1 instance and one for our
> 6.3 instance.
>
> I just tried running some code on our 5.1 area and I'm getting an error on
> this line:
>
> == This line ==>        TableRow row = DatabaseManager.create(context,
> "umrestricted");
>
>
>         row.setColumn("item_id", item.getID());
>
>         row.setColumn("release_date", releaseDate);
>
>
>         DatabaseManager.update(context, row);
>
>
> org.postgresql.util.PSQLException: ERROR: null value in column "id"
> violates not-null constraint
>
>   Detail: Failing row contains (null, null, null).
>
>
> This is what the table looks like:
>
>
>                                          Table "public.umrestricted"
>
>     Column    |            Type             |                           
> Modifiers
>
>
>
> --------------+-----------------------------+----------------------------------------------------------------
>
>  id           | integer                     | not null default
> nextval(('umrestricted_seq'::text)::regclass)
>
>  item_id      | character varying(250)      |
>
>  release_date | timestamp without time zone |
>
>
>
> This has worked fine for years.  Not sure what's happening.  I think it
> must be something that went on while working on the 6.3 upgrade.
>
>
> Thank you!
>
> -Jose
>

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-scBx_1SmgjdKMDD4BHmLh0rBpnTQjkFF%3DriOB--FsTRg%40mail.gmail.com.

Reply via email to