Deprecated queries (foreign constraints) are removed.