title: How can I realise "Write to both columns" in Rails Active Record (as Strong migrations recommends)?
body: <p>I'm trying to change type of column in PostgreSQL (Rails 6).</p>
  <p><strong>migration:</strong></p>
  <pre><code># frozen_string_literal: true
  
  class ChangeUsersEmailToCitext &lt; ActiveRecord::Migration[6.0]
    def up
      enable_extension('citext')
  
      change_column :users, :email, :citext
    end
  
    def down
      change_column :users, :email, :string
    end
  end
  </code></pre>
  <p>But Strong Migrations throws error and says following:</p>
  <pre><code>=== Dangerous operation detected #strong_migrations ===
  
  Changing the type of an existing column blocks reads and writes
  while the entire table is rewritten. A safer approach is to:
  
  1. Create a new column
  2. Write to both columns
  3. Backfill data from the old column to the new column
  4. Move reads from the old column to the new column
  5. Stop writing to the old column
  6. Drop the old column
  </code></pre>
  <p>I understand the point and danger of db locking... but my question is pretty silly, and I haven't found answer on it. How literally can I make 2nd, 4th and 5th points? How can I force my ActiveRecord model write to both columns at the same time and switch after backfilling to the right one?</p>