quyen91 / ishare

share by issues
0 stars 0 forks source link

Note for creating a migration in rails #1

Open quyen91 opened 7 years ago

quyen91 commented 7 years ago

http://jacopretorius.net/2014/07/patterns-for-data-migrations-in-rails.html

Some time, we must write raw query instead of Model object that we don't depend on Model. One day, maybe we want to change name of Model and will cause error for migration

quyen91 commented 7 years ago

Alway set null: false when you set default: value in migration