I had the exact same problem and the post of arnaudguy fixed it like a charm. So please
- set the app in repair mode
- use the postgres button on the top to enter postgres
- follow the steps of arnaudguy
SELECT
tc.constraint_name,
kcu.column_name,
ccu.table_name AS foreign_table_name,
ccu.column_name AS foreign_column_name
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu
ON tc.constraint_name = kcu.constraint_name
JOIN information_schema.constraint_column_usage ccu
ON ccu.constraint_name = tc.constraint_name
WHERE tc.table_name = 'user_agent_details'
AND tc.constraint_type = 'FOREIGN KEY';
SELECT COUNT(*) AS nb_violations
FROM user_agent_details
WHERE organization_id IS NULL;
BEGIN;
DELETE FROM user_agent_details
WHERE organization_id IS NULL;
COMMIT;
ALTER TABLE user_agent_details VALIDATE CONSTRAINT check_17a3a18e31;
BEGIN
DELETE 1
COMMIT
ALTER TABLE
SELECT conname, convalidated
FROM pg_constraint
WHERE conname = 'check_17a3a18e31';
- Exit postgres
\q - deactivate repair mode
and voilá it works again...
thanks a lot to you guys...



