I am trying to dig deeper with Ecto and Postgres at the same time and some of the examples in the Ecto documentation are confusing. For example, I was wondering how I would add column and table constraints in a migration but looking up
Ecto.Migration wouldn’t tell me. The “Options” section is also confusing:
:check - The expression to evaluate on a row. Required when creating.
:name - The name of the constraint - required.
:name- as the function has to be called with a name (
constraint(table, name, opts \\ )) this seems to be redundant and not even used in the examples
:exclude- not mentioned at all yet used in the examples
:comment- only mentioned in the module docs for
Ecto.Migrationbut shouldn’t it be mentioned at
Am I looking at the wrong docs?