|
Description:
|
HHH-1904 cause non-explicitly named constraints to use randomly generated hex characters. Instead, it would be better to go back to a scheme that uses the table and column names, allowing naming consistency *and* control over the name length.
Concat the table and column names, md5 it, then convert the hex to base 35 (full alphanumeric). This guarantees a < 30 character hash.
In addition, take this a step further. Wrap the implicit, generated naming into a new contract: ConstraintImplicitNamingStrategy. The default strategy does the above, but we would allow applications to define their own strategies to fit in with their existing naming conventions.
|