Browse Source

fix #120 CNAME record length restriction

pull/1/head
Nicolae Claudius 11 years ago
parent
commit
3e1b757097
  1. 2
      app/models/cname.rb
  2. 5
      db/migrate/20130918144521_change_records_content_length.rb
  3. 4
      db/schema.rb

2
app/models/cname.rb

@ -9,7 +9,7 @@
#
class CNAME < Record
validates :name, :hostname => {:allow_underscore => true, :allow_wildcard_hostname => true}
validates :content, :presence => true, :length => { :maximum => 1024 }, :hostname2 => true
validates :content, :presence => true, :length => { :maximum => 20000 }, :hostname2 => true
end

5
db/migrate/20130918144521_change_records_content_length.rb

@ -0,0 +1,5 @@
class ChangeRecordsContentLength < ActiveRecord::Migration
def change
change_column :records, :content, :string, limit: 20000
end
end

4
db/schema.rb

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20130824171517) do
ActiveRecord::Schema.define(version: 20130918144521) do
create_table "admins", force: true do |t|
t.string "email", default: "", null: false
@ -98,7 +98,7 @@ ActiveRecord::Schema.define(version: 20130824171517) do
t.integer "domain_id"
t.string "name"
t.string "type", limit: 10
t.string "content"
t.string "content", limit: 20000
t.integer "ttl"
t.integer "prio"
t.integer "change_date"

Loading…
Cancel
Save