When a model uses the :disjoint true modifier in a field definition, a constraint is created on that field in caribou.db using the following sql statement:
alter table {model_name} add constraint {field_name}_unique unique ({field_name})
In PostgresSQL, constraint names must be globally unique. Imagine two models both have a field named 'email' which has a unique constraint on it. This would cause both constraints to be called 'email_unique'.
The constraint names should be made that fields with the same name on different models should not cause a conflict.
When a model uses the :disjoint true modifier in a field definition, a constraint is created on that field in caribou.db using the following sql statement:
(Replaced % arguments with {name} to indicate replacement) https://github.com/caribou/caribou-core/blob/master/src/caribou/db.clj#L190
In PostgresSQL, constraint names must be globally unique. Imagine two models both have a field named 'email' which has a unique constraint on it. This would cause both constraints to be called 'email_unique'.
The constraint names should be made that fields with the same name on different models should not cause a conflict.