Add foreign keys and not null constraints for permissions