mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
Remove rcon column from servers table
This commit is contained in:
parent
2ada536da2
commit
89891d2679
5 changed files with 11 additions and 10 deletions
|
@ -8,7 +8,6 @@
|
||||||
# dns :string(255)
|
# dns :string(255)
|
||||||
# ip :string(255)
|
# ip :string(255)
|
||||||
# port :string(255)
|
# port :string(255)
|
||||||
# rcon :string(255)
|
|
||||||
# password :string(255)
|
# password :string(255)
|
||||||
# irc :string(255)
|
# irc :string(255)
|
||||||
# user_id :integer
|
# user_id :integer
|
||||||
|
@ -44,7 +43,7 @@ class Server < ActiveRecord::Base
|
||||||
attr_protected :id, :user_id, :updated_at, :created_at, :map, :players, :maxplayers, :ping, :version
|
attr_protected :id, :user_id, :updated_at, :created_at, :map, :players, :maxplayers, :ping, :version
|
||||||
|
|
||||||
validates_length_of [:name, :dns,], :in => 1..30
|
validates_length_of [:name, :dns,], :in => 1..30
|
||||||
validates_length_of [:rcon, :password, :irc], :maximum => 30, :allow_blank => true
|
validates_length_of [:password, :irc], :maximum => 30, :allow_blank => true
|
||||||
validates_length_of :description, :maximum => 255, :allow_blank => true
|
validates_length_of :description, :maximum => 255, :allow_blank => true
|
||||||
validates_format_of :ip, :with => /\A[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\z/
|
validates_format_of :ip, :with => /\A[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\z/
|
||||||
validates_format_of :port, :with => /\A[0-9]{1,5}\z/
|
validates_format_of :port, :with => /\A[0-9]{1,5}\z/
|
||||||
|
@ -81,7 +80,6 @@ class Server < ActiveRecord::Base
|
||||||
non_versioned_columns << 'dns'
|
non_versioned_columns << 'dns'
|
||||||
non_versioned_columns << 'ip'
|
non_versioned_columns << 'ip'
|
||||||
non_versioned_columns << 'port'
|
non_versioned_columns << 'port'
|
||||||
non_versioned_columns << 'rcon'
|
|
||||||
non_versioned_columns << 'password'
|
non_versioned_columns << 'password'
|
||||||
non_versioned_columns << 'irc'
|
non_versioned_columns << 'irc'
|
||||||
non_versioned_columns << 'user_id'
|
non_versioned_columns << 'user_id'
|
||||||
|
|
|
@ -16,10 +16,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fields horizontal">
|
|
||||||
<%= f.label :rcon %>
|
|
||||||
<%= f.text_field :rcon %>
|
|
||||||
</div>
|
|
||||||
<div class="fields horizontal">
|
<div class="fields horizontal">
|
||||||
<%= f.label :password %>
|
<%= f.label :password %>
|
||||||
<%= f.text_field :password %>
|
<%= f.text_field :password %>
|
||||||
|
|
9
db/migrate/20150518162749_remove_rcon_from_servers.rb
Normal file
9
db/migrate/20150518162749_remove_rcon_from_servers.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
class RemoveRconFromServers < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
remove_column :servers, :rcon
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
add_column :servers, :rcon, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20141010193221) do
|
ActiveRecord::Schema.define(:version => 20150518162749) do
|
||||||
|
|
||||||
create_table "admin_requests", :force => true do |t|
|
create_table "admin_requests", :force => true do |t|
|
||||||
t.string "addr"
|
t.string "addr"
|
||||||
|
@ -722,7 +722,6 @@ ActiveRecord::Schema.define(:version => 20141010193221) do
|
||||||
t.string "dns"
|
t.string "dns"
|
||||||
t.string "ip"
|
t.string "ip"
|
||||||
t.string "port"
|
t.string "port"
|
||||||
t.string "rcon"
|
|
||||||
t.string "password"
|
t.string "password"
|
||||||
t.string "irc"
|
t.string "irc"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
# dns :string(255)
|
# dns :string(255)
|
||||||
# ip :string(255)
|
# ip :string(255)
|
||||||
# port :string(255)
|
# port :string(255)
|
||||||
# rcon :string(255)
|
|
||||||
# password :string(255)
|
# password :string(255)
|
||||||
# irc :string(255)
|
# irc :string(255)
|
||||||
# user_id :integer
|
# user_id :integer
|
||||||
|
|
Loading…
Reference in a new issue