Protect against bad data
Fix nullability and unique constraints in tables

These are the tables dealing with polymorphic relationships.
Add db migration for unique constraint on program_controls
Add association directive_controls