[migration] add_relation don't take into account `required=True`
How to reproduce this bug ?
- take one of your cube, add
poulet=String(required=True)
in one class schema declaration, and rundb-init
. If you ask postgresql, you should find thatpoulet
isNON-nullable
; - on an existing base, add
poulet=String(required=True)
in one class schema declaration, and add this attribute in the shell withadd_attribute("MyClass", "poulet")
. If you ask postgresql, you should find thatpoulet
can be NULL, while it shouldn't.
Cubicweb version 3.28, with postgresql 11