add foreign key and unique/not null constraints to the database schema