Class: RuboCop::Cop::Migration::RenameTable
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Migration::RenameTable
- Defined in:
- lib/rubocop/cop/migration/rename_table.rb
Overview
Do not rename tables. It will cause down time in your application and is unsafe for pt-online-schema-change. Instead:
- Create a new table
- Backfill and write to the new table
- Drop the old table
Constant Summary collapse
- MSG =
"Do not rename tables. It will cause down time in your application " \ "and is unsafe for pt-online-schema-change."
Instance Method Summary collapse
- #on_send(node) ⇒ Object (also: #on_csend)
Instance Method Details
#on_send(node) ⇒ Object Also known as: on_csend
39 40 41 42 43 |
# File 'lib/rubocop/cop/migration/rename_table.rb', line 39 def on_send(node) return unless rename_table?(node) add_offense(node) end |