Sha256: 16a0b3a883bb8ae0e7567990ec5fc551a14483879f4c03c4497db0b3e90f1144

Contents?: true

Size: 1.53 KB

Versions: 96

Compression:

Stored size: 1.53 KB

Contents

class AddFieldsToQueryservers < ActiveRecord::Migration
  def self.up
    remove_column :queryservers, :content
    add_column :queryservers, :mod, :text, :limit => 1024*1024
    add_column :queryservers, :players, :text, :limit => 1024*1024
    add_column :queryservers, :signatures, :text, :limit => 1024*1024

    add_column :queryservers, :numplayers, :integer, :default => 0
    add_column :queryservers, :gamestate, :integer
    add_column :queryservers, :language, :integer
    add_column :queryservers, :ping, :integer
    add_column :queryservers, :difficulty, :integer

    add_column :queryservers, :gamever, :string
    add_column :queryservers, :gametype, :string
    add_column :queryservers, :gamemode, :string
    add_column :queryservers, :mission, :string
    add_column :queryservers, :mapname, :string
    add_column :queryservers, :country, :string
    add_column :queryservers, :platform, :string

    add_column :queryservers, :sv_battleye, :boolean
    add_column :queryservers, :verifysignatures, :boolean
    add_column :queryservers, :password, :boolean
    add_column :queryservers, :dedicated, :boolean
    add_column :queryservers, :favorite, :boolean
  end

  def self.down
    [:mod, :players, :signatures, :numplayers, :gamestate, :language, :ping, :difficulty, :gamever, :gametype, :gamemode, :mission, :mapname, :country, :platform, :sv_battleye, :verifysignatures, :password, :dedicated, :favorite].each do |c|
      remove_column :queryservers, c
    end
    add_column :queryservers, :content, :text, :limit => 1024*1024
  end
end

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
six-updater-web-0.24.15 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.14 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.13 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.12 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.11 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.10 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.9 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.8 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.7 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.6 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.5 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.4 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.3 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.2 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.1 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.24.0 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.23.7 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.23.6 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.23.5 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb
six-updater-web-0.23.4 lib/six-updater-web/db/migrate/20100404150547_add_fields_to_queryservers.rb