Skip to content

Refactor hooking ActiveRecord migration tasks - #588

Merged
ctran merged 1 commit into
ctran:developfrom
uu1t:fix-redo-migration-hook
Feb 14, 2019
Merged

Refactor hooking ActiveRecord migration tasks#588
ctran merged 1 commit into
ctran:developfrom
uu1t:fix-redo-migration-hook

Conversation

@uu1t

@uu1tuu1t commented Dec 12, 2018

Copy link
Copy Markdown
Contributor

Added 3 changes:

  1. Use Rake::Task#enhance insteaad of defining same tasks again.

  2. Remove hooking db:migrate:change task which doesn't exist. This hook has been added by Support :change migrations in Rails 3.1 #42, but as far as I searched I can't find the task in Rails 3.1 or greater version.

  3. Fix hooking db:migrate:redo task so that the annotation runs after all migration tasks. Closedb:migrate:redo reverses the annotation but doesn't redo it #548.
    This is done by hooking the top level task to run the annnotation. (ref: https://stackoverflow.com/a/3915951)

- Use Rake::Task#enhance insteaad of defining same tasks again
- Remove hooking db:migrate:change task which doesn't exist
- Fix hooking db:migrate:reset task so that the annotation runs after
all migration tasks (ctran#548)
@ctran
ctran self-requested a review February 14, 2019 16:59
@ctranctran self-assigned this Feb 14, 2019
@ctranctran added this to the v.2.7.5 milestone Feb 14, 2019
@ctran
ctran merged commit dc82727 into ctran:developFeb 14, 2019
@ctran

Copy link
Copy Markdown
Owner

Thanks!!!

@uu1t
uu1t deleted the fix-redo-migration-hook branch February 14, 2019 23:34
onk added a commit to onk/annotate_models that referenced this pull request Dec 3, 2020
ActiveRecord's migrate tasks are required since v2.7.5 (ctran#588).
onk added a commit to onk/annotate_models that referenced this pull request Dec 3, 2020
ActiveRecord's migrate tasks are required since v2.7.5 (ctran#588).
ctran pushed a commit that referenced this pull request Jan 3, 2021
ActiveRecord's migrate tasks are required since v2.7.5 (#588).
ocarta-l pushed a commit to ocarta-l/annotate_models that referenced this pull request Jun 18, 2021
)
ActiveRecord's migrate tasks are required since v2.7.5 (ctran#588).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@uu1t@ctran