On execution of /intranet/admin/cleanup-demo/cleanup-demo-data error is reported:
update or delete on table "im_baselines" violates foreign key constraint "im_audits_baseline_fk" on table "im_audits" See details in the attachment.
Hi Antanas,
Thanks for posting. You used the wrong PostgreSQL database dump, apparently. Which version do you use and how did you get the dump?
Cheers Frank
Anonymous
You seem to have CSS turned off. Please don't fill out this field.
Hi Frank,
Thanks for a quick reply. I just now did it from scratch: $ psql -f ~/pg_dump.5.0.3.0.0.sql The dump obtained from https://sourceforge.net/projects/project-open/files/project-open/V5.0/update/project-open-Update-5.0.3.0.0.tgz
$ psql -f ~/pg_dump.5.0.3.0.0.sql
]project-open[ Version: 5.0.3.0.0 OS Platform: Linux OS Version: 4.9.0-14-amd64 TCL Version: 8.5.18 Web Server Version: 4.99
/intranet/admin/cleanup-demo/cleanup-demo-data-2? returns same error mentioned above.
/intranet/admin/cleanup-demo/cleanup-demo-data-2?
one more test this morning starting from very scratch with su - projop -c "dropdb projop". Same error.
su - projop -c "dropdb projop"
Hi!
There are apparently objects of type "im_baseline" in the dump that shouldn't be there. So let's try to delete them, they are not essential. Actually, you can delete them completely, together with the im_audits entries.
update im_audits set audit_baseline_id = null; update acs_objects set last_audit_id = null; update im_audits set audit_last_id = null; delete from im_baselines; delete from im_audits;
Optional:
delete from acs_objects where object_type = 'im_baseline';
In the case that you get an error message try setting to NULL the referencing object or try to delete the referencing object.
that worked well! Thank you.
Hi Antanas,
Thanks for posting.
You used the wrong PostgreSQL database dump, apparently.
Which version do you use and how did you get the dump?
Cheers
Frank
Hi Frank,
Thanks for a quick reply.
I just now did it from scratch:
$ psql -f ~/pg_dump.5.0.3.0.0.sql
The dump obtained from https://sourceforge.net/projects/project-open/files/project-open/V5.0/update/project-open-Update-5.0.3.0.0.tgz
]project-open[ Version: 5.0.3.0.0
OS Platform: Linux
OS Version: 4.9.0-14-amd64
TCL Version: 8.5.18
Web Server Version: 4.99
/intranet/admin/cleanup-demo/cleanup-demo-data-2?
returns same error mentioned above.Hi Frank,
one more test this morning starting from very scratch with
su - projop -c "dropdb projop"
.Same error.
Hi!
There are apparently objects of type "im_baseline" in the dump that shouldn't be there.
So let's try to delete them, they are not essential. Actually, you can delete them completely, together with the im_audits entries.
Optional:
In the case that you get an error message try setting to NULL the referencing object or try to delete the referencing object.
Cheers
Frank
Hi Frank,
that worked well!
Thank you.