Modify some constraints and primary keys