You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 4, 2019. It is now read-only.
@@ -136,18 +136,18 @@ class AddPhoneFlagsToNotifications < ActiveRecord::Migration
136
136
end
137
137
```
138
138
139
-
## Result
139
+
###Result
140
140
- Migration takes hours!
141
141
- There is no table locking
142
142
- Application is slower due to all the writes to notifications table
143
143
- Nothing grinds to a halt
144
144
145
-
# Takeaways
145
+
##Takeaways
146
146
- Always be mindful of the number of rows affected in the migration
147
147
- Be mindful of the transaction size
148
148
- Leverage Postgres features
149
149
150
-
## Possible alternate solution
150
+
###Possible alternate solution
151
151
- Handle NULL case in code to treat as the desired default value
152
152
- Clean solution and quick turn around but required us to muck up the model to abstract out that case. Give that we may or may not have complete control over how that those values are extracted from the model, this may turn into lots of defensive code.
0 commit comments