What's the recommended way to alter a column from int(10) to bigint(8) on a table with 2,000,000,000+ records in Rails considering:
- Runs in production and is exposed to customers
- Records are continuously being added to the table
- As mentioned above the table is large
Here's a sample migration that illustrates what the outcome should be:
class ChangeTableNameIdType < ActiveRecord::Migration
def change
execute('ALTER TABLE table_name MODIFY COLUMN id BIGINT(8) NOT NULL AUTO_INCREMENT')
end
end