lib/strong_migrations/migration.rb in strong_migrations-0.1.0 vs lib/strong_migrations/migration.rb in strong_migrations-0.1.1

- old
+ new

@@ -21,11 +21,11 @@ raise_error :rename_table when :rename_column raise_error :rename_column when :add_index options = args[2] - unless options && options[:algorithm] == :concurrently + if %w(PostgreSQL PostGIS).include?(connection.adapter_name) && !(options && options[:algorithm] == :concurrently) raise_error :add_index end when :add_column type = args[2] options = args[3] @@ -81,23 +81,19 @@ end end Once it's deployed, wrap this step in a safety_assured { ... } block." when :rename_column -"There's no way to rename a column without downtime. +"If you really have to: -If you really have to: - 1. Create a new column 2. Write to both columns 3. Backfill data from the old column to 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" when :rename_table -"There's no way to rename a table without downtime. - -If you really have to: +"If you really have to: 1. Create a new table 2. Write to both tables 3. Backfill data from the old table to new table 4. Move reads from the old table to the new table