Browse files

Deploy without downtime: Doc change_column_null

  • Loading branch information...
1 parent 555cdc8 commit 11fcaa55c7d62d88319c75db867f5468955ee290 @henrik henrik committed Feb 6, 2017
Showing with 2 additions and 0 deletions.
  1. +2 −0 deploy_without_downtime/
@@ -105,6 +105,8 @@ Specifically:
* **Changing column types** is probably not safe. One case is safe though - changing a :string to :text (internally VARCHAR(255) to TEXT). This is because they are essentially compatible, and :text can hold more data than :string. But the other way may truncate data.
+* **Changing column NULL** is not safe. E.g. `change_column_null :foos, :bar_id, false`. It causes a read-and-write lock on the entire table which may cause downtime for large tables that are in active use. [Read more.](
* **Removing tables** is never safe.
Just like with removing columns, deploy them in two steps:

0 comments on commit 11fcaa5

Please sign in to comment.