Class: Scheman::Views::Mysql::DropIndex

Inherits:
AlterTable show all
Defined in:
lib/scheman/views/mysql.rb

Instance Method Summary collapse

Methods inherited from AlterTable

#table_name

Methods inherited from Node

#initialize

Constructor Details

This class inherits a constructor from Scheman::Views::Mysql::Node

Instance Method Details

#to_sObject



217
218
219
220
221
222
223
# File 'lib/scheman/views/mysql.rb', line 217

def to_s
  if @element[:primary]
    "DROP PRIMARY KEY"
  else
    "DROP INDEX `#{index_name}`"
  end
end