No need of foreign keys on temporary tables

Description

There are some temporary tables with foreign keys that sometimes stop from deleting records from the database, for example T_Aging.C_Activity.

The query to look for these is:

1 2 3 4 5 6 SELECT t.tablename, c.columnname, c.fkconstraintname, c.fkconstrainttype, c.ad_reference_id FROM ad_table t JOIN ad_column c USING (ad_table_id) WHERE t.tablename LIKE 'T\_%' AND c.ad_reference_id IN (13,18,19,30,21,31,25,33,35,32,53370) AND (c.fkconstrainttype IS NOT NULL OR c.fkconstraintname IS NOT NULL) AND c.fkconstrainttype NOT IN ('D','C') ORDER BY 1,2

Environment

None

Status

Assignee

Carlos Ruiz

Reporter

Carlos Ruiz

Labels

None

Tested By

None

Fix versions

Priority

Major