From 1400746cd7f3309cfbbc0e0c0be1c0c06f551b16 Mon Sep 17 00:00:00 2001 From: Rob Orton Date: Fri, 25 Sep 2015 00:57:36 -0600 Subject: [PATCH] change auth_filter from string to text fixes CNVS-21313 test plan - db:migrate should pass Change-Id: I0f61ad9d71a6d3fc4c5d31ecffa685bb7f699000 Reviewed-on: https://gerrit.instructure.com/64008 Tested-by: Jenkins Product-Review: Rob Orton QA-Review: Rob Orton Reviewed-by: Jacob Fugal --- app/models/account_authorization_config.rb | 1 + .../20150925063254_change_auth_filter_to_text.rb | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 db/migrate/20150925063254_change_auth_filter_to_text.rb diff --git a/app/models/account_authorization_config.rb b/app/models/account_authorization_config.rb index 9f3aa61e965..9b506a15412 100644 --- a/app/models/account_authorization_config.rb +++ b/app/models/account_authorization_config.rb @@ -21,6 +21,7 @@ require 'net_ldap_extensions' class AccountAuthorizationConfig < ActiveRecord::Base include Workflow + validates :auth_filter, length: {maximum: maximum_text_length, allow_nil: true, allow_blank: true} strong_params diff --git a/db/migrate/20150925063254_change_auth_filter_to_text.rb b/db/migrate/20150925063254_change_auth_filter_to_text.rb new file mode 100644 index 00000000000..ea735d6b26f --- /dev/null +++ b/db/migrate/20150925063254_change_auth_filter_to_text.rb @@ -0,0 +1,11 @@ +class ChangeAuthFilterToText < ActiveRecord::Migration + tag :postdeploy + + def self.up + change_column :account_authorization_configs, :auth_filter, :text + end + + def self.down + change_column :account_authorization_configs, :auth_filter, :string + end +end