Import CONSTRAINT

Hi,
I’m trying to import my PostgreSQL db.
I have a problem with importing CONSTRAINTs. Here is an example:
´´´
CONSTRAINT “column_name” CHECK ((“options” = ANY (ARRAY[‘OPTION1’, ‘OPTION2’]))),
´´´
It gives me the following error:
Expected “)” but “(” found.

What’s the correct syntax here?

Thanks,
René

Hi René,

Thank you for reporting the issue.

We currently do not fully support importing Check Constraints syntax in PostgreSQL. You can safely remove the Check Constraints because we do not store the Check Constraints in the DBML yet.

Link to feature request:

1 Like

Ans: This correct code:
CONSTRAINT “column_name” CHECK (“options” IN (‘OPTION1’, ‘OPTION2’))