Fix DB constraint names and DDL
I noticed that some DB constraint names were missing the _and_
to join column names. Also, the constraint names in the DDL script were not correct. This MR fixes both of these issues. I also took this opportunity to adjust the indentation in migration files.
Edited by João Pereira