We're updating the issue view to help you get more done. 

Make unique constraint handling on schema update configurable

Description

forced uniqueness to be defined by constraints through alter table statements. identified that this was not occurring on schema updates.

Since resulted in non-explicitly-named constraint names using randomly-generated characters, checking for a constraint's existence prior to creating it on a schema update is not always possible. This leads to errors.

We cannot simply remove unique constraint generation on an update all-together. Instead, let's make it configurable. A property would select from the following:

1.) Update ignores all unique constraints
2.) Update attempts to (re-)create the unique constraints and ignores any errors (with warn log)

I'd argue that #2 would be the default.

More info: http://lists.jboss.org/pipermail/hibernate-dev/2013-April/009592.html

Environment

None

Status

Assignee

Brett Meyer

Reporter

Brett Meyer

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Major