moved NOT NULL statements into jinja template