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

Add hooks for script command #203

Closed
tohagan-tmr opened this issue Dec 1, 2021 · 1 comment · Fixed by #206
Closed

Add hooks for script command #203

tohagan-tmr opened this issue Dec 1, 2021 · 1 comment · Fixed by #206
Assignees
Milestone

Comments

@tohagan-tmr
Copy link
Contributor

I found that when using this setting in development.properties ...

hook_after_each_up=SQL:after-each-up.sql
hook_after_each_down=SQL:after-each-down.sql

The SQL in after-each-up.sql and after-each-down.sql was correctly executed when running migrate up and migrate down but was excluded from code emitted by migrate script.

I'd recommend this feature be added and enabled via an option in .*properties files such as hook_sql_scripts_enabled=true which would be false by default for backward compatibility in case existing projects don't wish / expect this to code be emitted. I think it's reasonable to assume that non-SQL hooks are always ignored.

@harawata
Copy link
Member

harawata commented Dec 4, 2021

Hello @tohagan-tmr ,

#199 seems like a good use case for this enhancement (i.e. append COMMIT call after inserting changelog entry).
The implementation will be significantly different from the existing hooks, so give me some time to think about it.

@harawata harawata added this to the 3.3.10 milestone Dec 8, 2021
@harawata harawata self-assigned this Dec 8, 2021
@harawata harawata changed the title BUG/Feature?: migrate script : SQL hooks are NOT included in emitted SQL code. Add hooks for script command Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants