Added missing foreign key constraints.
Added missing foreign key constraints.


Former-commit-id: 2cd4b4b98d4e1d33490b1bdf5487d0961ad6ab0e
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine