added constraints to soem tables