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
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
ActiveRecord migrations for Postgres made safe.
4
4
5
-

5
+

6
6
7
7
## Requirements
8
8
@@ -93,7 +93,7 @@ When **Safe PG Migrations** is used, migrations are not wrapped in a transaction
93
93
- In order to be able to retry statements that have failed because of a lock timeout, we have to be outside a transaction.
94
94
- In order to add an index concurrently, we have to be outside a transaction.
95
95
96
-
Note that if a migration fails, it won't be rollbacked. This can result in migrations being partially applied. In that case, they need to be manually reverted.
96
+
Note that if a migration fails, it won't be rolled back. This can result in migrations being partially applied. In that case, they need to be manually reverted.
97
97
98
98
</details>
99
99
@@ -110,7 +110,7 @@ PG will still needs to update every row of the table, and will most likely state
110
110
111
111
<blockquote>
112
112
113
-
**Note: Pre-postgre 11**
113
+
**Note: Pre-postgres 11**
114
114
Adding a column with a default value and a not-null constraint is [dangerous](https://wework.github.io/data/2015/11/05/add-columns-with-default-values-to-large-tables-in-rails-postgres/).
115
115
116
116
**Safe PG Migrations** makes it safe by:
@@ -122,7 +122,7 @@ Adding a column with a default value and a not-null constraint is [dangerous](ht
122
122
123
123
Note: the addition of the not null constraint may timeout. In that case, you may want to add the not-null constraint as initially not valid and validate it in a separate statement. See [Adding a not-null constraint on Postgres with minimal locking](https://medium.com/doctolib-engineering/adding-a-not-null-constraint-on-pg-faster-with-minimal-locking-38b2c00c4d1c).
124
124
125
-
</blockquote>
125
+
</blockquote>
126
126
127
127
</details>
128
128
@@ -152,7 +152,7 @@ Adding the constraint itself is rather fast, the major part of the time is spent
152
152
153
153
<details><summary>Retry after lock timeout</summary>
154
154
155
-
When a statement fails with a lock timeout, **Safe PG Migrations** retries it (5 times max) [list of retryable statments](https://github.com/doctolib/safe-pg-migrations/blob/66933256252b6bbf12e404b829a361dbba30e684/lib/safe-pg-migrations/plugins/statement_retrier.rb#L5)
155
+
When a statement fails with a lock timeout, **Safe PG Migrations** retries it (5 times max) [list of retriable statements](https://github.com/doctolib/safe-pg-migrations/blob/66933256252b6bbf12e404b829a361dbba30e684/lib/safe-pg-migrations/plugins/statement_retrier.rb#L5)
0 commit comments