Store model table constraints in model sql file

The problem I’m having

I am currently trying to figure out how to migrate the current infra to a more modern data-stack, which involves dbt for the T part of the process. Currently i am stuck on the following problem. I would like to store specific column attributes inside the sql file, which would be initialised at runtime. Is it possible to store table constraints within the model .sql file?

The context of why I’m trying to do this

Datamart Dimension tables currently require a NOT NULL for all columns. I would like to enforce the same ruleset in dbt.
Contextually i am using dbt-core 1.9 with postgresDB as storage.

What I’ve already tried

There are multiple ways this can be achieved, either NOT NULL within the query or schema.yml. Still, it would be more elegant in our use case to somehow implement constraints attributes within the model .sql file. Is this possible?

Some example code or error messages

{{ config(
    materialized = 'table',
     unique_key=['customer_key'],
    constraints = {
      "customer_id": "not_null",
      "customer_name": "not_null"
    }

) }}