Class: ModSpox::Migrations::NickModeNoPark

Inherits:
Sequel::Migration
  • Object
show all
Defined in:
lib/mod_spox/migrations/005_nick_mode_nopark.rb

Instance Method Summary collapse

Instance Method Details

#downObject



12
13
14
15
# File 'lib/mod_spox/migrations/005_nick_mode_nopark.rb', line 12

def down
    Database.db.drop_column :nicks, :mode
    Database.add_column :nicks, :parked, :bool, :null => false, :default => true
end

#upObject



5
6
7
8
9
10
# File 'lib/mod_spox/migrations/005_nick_mode_nopark.rb', line 5

def up
    Database.db.drop_column :channels, :parked
    Database.db.add_column :nicks, :mode, :varchar, :null => true, :default => ''
    Database.db.drop_table :channel_modes
    Database.db.add_column :channels, :mode, :varchar, :null => true, :default => ''
end