class Scheman::Views::Mysql::DropIndex

Public Instance Methods

to_s() click to toggle source
# File lib/scheman/views/mysql.rb, line 217
def to_s
  if @element[:primary]
    "DROP PRIMARY KEY"
  else
    "DROP INDEX `#{index_name}`"
  end
end

Private Instance Methods

index_name() click to toggle source

TODO How to refer to an automatically named index name?

# File lib/scheman/views/mysql.rb, line 228
def index_name
  @element[:name] || @element[:column]
end