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

Implement dry run version of the script #19

Closed
ka8725 opened this issue Mar 27, 2023 · 4 comments
Closed

Implement dry run version of the script #19

ka8725 opened this issue Mar 27, 2023 · 4 comments

Comments

@ka8725
Copy link
Member

ka8725 commented Mar 27, 2023

Create a mechanism that allows to roll back the phantom migrations.

Ideas on how to implement it (can be implemented both):

  1. Add an option to the command line: rake db:rollback_branches --dry-run
  2. Via env var. Apply dry run if ACTUAL_DB_SCHEMA_ROLLBACK_BRANCHES_DRY_RUN=true

The dry run should not roll back any migrations but rather output the phantom migrations list.

Prefer the same output format in the output as in the following Rails' task:

rails db:migrate:status

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20220923211114  Initial
   up     20221003092332  Add typical clients and samples links to vendor applications
   up     20221003094301  Add vendor id index to messages
   up     20221004031502  Add vendor company to users
   up     20221115233057  Add status to vendor applications
   up     20221129184509  Add type to quotes
   up     20221207181413  Create admin user approvals
   up     20221223154500  Add templates for sale to vendor application
   up     20230105173250  Create categories
   up     20230113173555  Add data to projects
   up     20230120192110  Create services
   up     20230126045226  Add terms accepted at to users
   up     20230131174014  Add active to services
@vic778
Copy link

vic778 commented Nov 26, 2023

Hello @ka8725, could you please provide some descriptions about the issue? I want to work on it.

@ka8725
Copy link
Member Author

ka8725 commented Nov 26, 2023

@vic778 done! Thanks for helping with that!

@vic778
Copy link

vic778 commented Dec 14, 2023

@ka8725 sorry for the delay I have a bunch of PRs to finish before starting my vacation. I will check on a new issue and work on it. Thanks for the update. I appreciate that

@ka8725
Copy link
Member Author

ka8725 commented Jan 3, 2024

Turned out this task was not needed. This issues covers it - #34

@ka8725 ka8725 closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants