Skip to content

Add multi db support for migrations #1

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

Merged
merged 17 commits into from
Mar 26, 2025

Conversation

MikolajSiwek
Copy link
Collaborator

@MikolajSiwek MikolajSiwek commented Mar 13, 2025

Description

Grouping for migrations in a multi database environment was not working correctly as this gem does not support that Rails 6+ feature. Handling multidb envs was added to this version of the gem.

How Has This Been Tested?

Tested locally on socialguide and mjollnir
Please describe how you tested your changes,
see how your change affects other areas of the code, etc.

Pull Request Checklist

  • Release doc has been updated
  • Check & update related docs or pager instructions
  • Check if the change is compliant with other systems (Mjollnir, Quality Dashboard, etc.)

Change Management

https://issues.talkwalker.net/issue/SCR-7023

@MikolajSiwek MikolajSiwek self-assigned this Mar 13, 2025
Copy link
Member

@Ciebiada Ciebiada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, but left some comments :D

@MikolajSiwek MikolajSiwek requested review from swiatek, czereba and Ciebiada and removed request for swiatek March 21, 2025 11:27
@MikolajSiwek MikolajSiwek marked this pull request as ready for review March 21, 2025 11:28
Copy link
Member

@Ciebiada Ciebiada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Some minor comments

 step as schema updates will be passed in a PR's, update README
@MikolajSiwek MikolajSiwek merged commit 07c89ff into master Mar 26, 2025
5 checks passed
@MikolajSiwek MikolajSiwek deleted the feature/add-multi-db-support branch March 26, 2025 10:17
migrator(migration.version).run
end

Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czereba @Ciebiada to bodajże to miejsce odpowiedzialne za tworzenie schema.
Z tego co pamiętam to usuneliśmy to, bo stwierdziliśmy że tego gema używamy i tak głównie przy deploymencie a wtedy schema już jest zupdatowana bo puszczamy migrację normalnie lokalnie updatując wtedy scheme 🤔
(Jest w PR już zupdatowana)

Jak są railsy to pewnie można używać railsowej komendy do migracji i ona nie używa gema ... ale dla projektów quasi rails hmm pewnie trzeba by użyć bundle exec rake db:migrate i wtedy wszystko się powinno zadziać okay ... bo tutaj puszczając lokalnie pewnie nie musimy puszczać w grupie? 🤔

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

Successfully merging this pull request may close these issues.

3 participants