grails-database-migration
grails-database-migration copied to clipboard
Plugin ignores schema
Steps to Reproduce
- Configure an app to use default schema
environments:
development:
dataSources:
dataSource:
username: <a_name>
password: <a_pass>
driverClassName: org.postgresql.Driver
dbCreate: none
url: <jdbc link to DB>
initialize: false
hibernate:
dialect: net.kaleidos.hibernate.PostgresqlExtensionsDialect
default_schema: default
- Create a new domain class and specify different schema (than the default) in the table mapping property
class Staff {
Boolean isCurrent
String name
static mapping = {
table schema: 'other_than_default'
id generator: 'sequence', params: [sequence: 'staff_seq']
version false
}
}
- Then run
grails dbm-gorm-diff --defaultSchema=default
Expected Behaviour
The plugin shouldn't create migrations for the new domain class
Actual Behaviour
The plugin generates migrations for the new domain class
Environment Information
- Operating System: Alpine Linux 3.7 (Docker image)
- Grails Version: 3.3.5
- Plugin Version: 3.0.3
- Database: PSQL 9.5
- JDK Version: 8