grails-database-migration icon indicating copy to clipboard operation
grails-database-migration copied to clipboard

Plugin ignores schema

Open ioannisGiak89 opened this issue 7 years ago • 0 comments

Steps to Reproduce

  1. 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
  1. 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
    }
}
  1. 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

ioannisGiak89 avatar Sep 25 '18 15:09 ioannisGiak89