Skip to content

Instantly share code, notes, and snippets.

View kohheepeace's full-sized avatar

Kohhee Peace kohheepeace

View GitHub Profile
@kohheepeace
kohheepeace / application.rb
Created August 15, 2021 21:05 — forked from jasonayre/application.rb
Rails Dynamic Subdomain Constraint / Store Example
and dont forget
config.eager_load_paths << Rails.root.join('lib')
@kohheepeace
kohheepeace / database_migration_best_practices.md
Created October 27, 2023 01:19 — forked from HelioCampos/database_migration_best_practices.md
Database migration best practices for Rails

Database migration best practices for Rails

Never ever change data on schema changes! [1]

Use rake tasks to change the data! [1]

This decouples a deployment from completed migrations. Give us control of the data manipulation proccess by encapsulatin it in on place. need to remember to:

  1. Run it in one of the ways bellow: a. Add this rake task the deployment script or;