[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: installation issue. null value in column "country_id" violates not-null constraint



On Sun, Feb 14, 2010 at 1:06 PM, Hugh Esco
<..hidden..> wrote:
> Hey folks:
>
> cat /usr/local/ledgersmb13/VERSION says I'm using: 1.2.99
>
> At this step, I see:
> ..hidden..:~$ psql -U postgres -d lsmb2 -t -c "INSERT INTO entity (name, entity_class, created) VALUES ('hesco', 3, NOW()) RETURNING name, entity_class, created;"
> ERROR:  null value in column "country_id" violates not-null constraint


Are you trying to create a user?

go with this instead:

SELECT admin__save_user(NULL,
                                         person__save(NULL, 3, 'Hugh',
'Esco', (select id from country where short_name = 'US')),
                                         'hesco', '[yourpasswd]');

You can substitute any other 2-letter country code for 'US' if you need to.

Best Wishes,
Chris Travers