aadrian opened a new issue, #14581:
URL: https://github.com/apache/grails-core/issues/14581
### Task List
- [x] Steps to reproduce provided
- [ ] Stacktrace (if present) provided
- [x] Example that reproduces the problem uploaded to Github
- [x] Full description of the issue provided (see below)
### Steps to Reproduce
For `inList` fields the check constraints seem to be missing:
-
https://github.com/aadrian/fieldbugs1/blob/master/grails-app/domain/com/mycorp/fieldbugs1/TableOne.groovy#L22`
should allow only `'S','M','L','XL'` and `null`
-
https://github.com/aadrian/fieldbugs1/blob/master/grails-app/domain/com/mycorp/fieldbugs1/TableOne.groovy#L23
should allow only `22, 42, 44, 66`
-
https://github.com/aadrian/fieldbugs1/blob/master/grails-app/domain/com/mycorp/fieldbugs1/TableOne.groovy#L24
should allow only `'y','n','x'`
but the generated DDL
https://github.com/aadrian/fieldbugs1/blob/master/ddl.sql does not contain
constraints on those fields (only a size limitation)
### Expected Behaviour
`schema-export` (and all `dbCreate` modes except 'none') should make use
of the check constraints, i.e. the generated DB should have them, and when
starting an application with `dbCreate=validate` should warn/error that they're
missing (like in the case of other mapping differences).
### Actual Behaviour
No check constraints are being used, nor any warning/error is being
displayed for `dbCreate=validate`.
### Environment Information
- **Operating System:** OSX, Linux, Win 7,8,10
- **GORM Version:** 6.1.9
- **Grails Version (if using Grails):** 3.3.3
- **JDK Version:** 1.8.0_162
### Example Application
https://github.com/aadrian/fieldbugs1/
Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]