Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding support for Flyway 'Placeholder replacement' feature #21

Open
srcshelton opened this issue Nov 3, 2016 · 1 comment

Comments

@srcshelton
Copy link
Owner

myway supports marker-substitution for Stored Procedures.

Flyway has a more generic placeholder replacement system for terms in the form of ’${placeholder}`.

In many ways, this feature raises more questions than it answers - since changing the value substituted for a given placeholder could significantly change the action taken as a result, this value would need to be stored and validated. Should it be considered an error to re-run a migration with a different substitution against the same database? Should a migration where a placeholder value is not specified inherit the previous value? Do we now have to pre-process all migrations to ensure that all placeholders have provided values?

The stated Flyway use-case for this feature is to perform different actions in different environments - something which myway achieves in an arguably cleaner fashion via the 'environment' metadata directive.

@srcshelton srcshelton changed the title Consider implementing Flyway 'Placeholder replacement' Consider adding support for Flyway 'Placeholder replacement' feature Nov 3, 2016
@srcshelton
Copy link
Owner Author

The relevant Flyway options here are:

  • placeholderPrefix, default '${'
  • placeholderSuffix, default '}'
  • placeholders.<name>=<value>, noting that 'placeholder' is now plural

... it is unclear how Flyway handles a placeholder whose name (or value) includes an '=' character...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant