Class: CASServer::Models::ChangeServiceToText

Inherits:
V
  • Object
show all
Defined in:
lib/casserver/models.rb

Class Method Summary collapse

Class Method Details

.downObject



209
210
211
# File 'lib/casserver/models.rb', line 209

def self.down
  change_column :casserver_st, :service, :string
end

.upObject



200
201
202
203
204
205
206
207
# File 'lib/casserver/models.rb', line 200

def self.up
  # using change_column to change the column type from :string to :text
  # doesn't seem to work, at least under MySQL, so we drop and re-create
  # the column instead
  remove_column :casserver_st, :service
  say "WARNING: All existing service tickets are being deleted."
  add_column :casserver_st, :service, :text
end