Update Migration - Added foreign keys

Added foreign keys for a better database consistency.