Skip to content

migration script folders prefixed with 'migration' are taken into account mistakenly #36

@nilskuhn

Description

@nilskuhn

I am using different folders of migration scripts for different Spring profiles in my application. In each profiles yml config, I do configure the folders via setting spring.elasticsearch.evolution.locations. If one of these folders name is prefixed with migration, it is taken into account mistakenly, no matter what is configured.

Given the following two Spring profiles, I would have expected, profile 1 only taking scripts within es/migration into account, whereas profile 2 should take both configured folders into account:

# Profile 1:
spring:
  elasticsearch:
    evolution:
      locations:
        - classpath:es/migration
# Profile 2: 
spring:
  elasticsearch:
    evolution:
      locations:
        - classpath:es/migration
        - classpath:es/migration-stage-dev  

Contrary to my expectation, even in profile 1, scripts from both folders are taken into account. If I rename folder es/migration-stage-dev into es/m-stage-dev everything works as expected.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions