Change Messages table url column to text
Fixes CNVS-21253 Test plan: Tests pass (manual QA is N/A) Change-Id: Iba5634b948e5857682cf574bf93160893f107461 Reviewed-on: https://gerrit.instructure.com/58351 Reviewed-by: Rob Orton <rob@instructure.com> Tested-by: Jenkins Reviewed-by: Joel Hough <joel@instructure.com> Product-Review: Matthew Wheeler <mwheeler@instructure.com> QA-Review: Matthew Wheeler <mwheeler@instructure.com>
This commit is contained in:
parent
1b732c6e3d
commit
b0b783149c
|
@ -64,6 +64,7 @@ class Message < ActiveRecord::Base
|
|||
validates_length_of :transmission_errors, :maximum => maximum_text_length, :allow_nil => true, :allow_blank => true
|
||||
validates_length_of :to, :maximum => maximum_text_length, :allow_nil => true, :allow_blank => true
|
||||
validates_length_of :from, :maximum => maximum_text_length, :allow_nil => true, :allow_blank => true
|
||||
validates_length_of :url, :maximum => maximum_text_length, :allow_nil => true, :allow_blank => true
|
||||
|
||||
# Stream policy
|
||||
on_create_send_to_streams do
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
class ChangeMessagesUrlToText < ActiveRecord::Migration
|
||||
tag :postdeploy
|
||||
|
||||
def self.up
|
||||
change_column :messages, :url, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :messages, :url, :string
|
||||
end
|
||||
end
|
|
@ -458,4 +458,10 @@ describe Message do
|
|||
end
|
||||
end
|
||||
|
||||
end
|
||||
it 'allows urls > 255 characters' do
|
||||
url = "a" * 256
|
||||
msg = Message.new
|
||||
msg.url = url
|
||||
msg.save!
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue