Class: Migsupo::Differ::Operations::RemoveIndex
- Inherits:
-
Object
- Object
- Migsupo::Differ::Operations::RemoveIndex
- Defined in:
- lib/migsupo/differ/operations/remove_index.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(table_name:, index:) ⇒ RemoveIndex
constructor
A new instance of RemoveIndex.
- #migration_type ⇒ Object
- #reversible? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(table_name:, index:) ⇒ RemoveIndex
Returns a new instance of RemoveIndex.
7 8 9 10 11 |
# File 'lib/migsupo/differ/operations/remove_index.rb', line 7 def initialize(table_name:, index:) @table_name = table_name.to_s @index = index freeze end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
5 6 7 |
# File 'lib/migsupo/differ/operations/remove_index.rb', line 5 def index @index end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
5 6 7 |
# File 'lib/migsupo/differ/operations/remove_index.rb', line 5 def table_name @table_name end |
Instance Method Details
#migration_type ⇒ Object
13 14 15 |
# File 'lib/migsupo/differ/operations/remove_index.rb', line 13 def migration_type :remove_index end |
#reversible? ⇒ Boolean
17 18 19 |
# File 'lib/migsupo/differ/operations/remove_index.rb', line 17 def reversible? true end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/migsupo/differ/operations/remove_index.rb', line 21 def to_s "remove_index #{table_name} [#{index.columns.join(', ')}]" end |