summaryrefslogtreecommitdiffstats
path: root/db/migrate/20161010081600_change_journals_notes_limit.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-06-13 07:50:48 +0000
committerGo MAEDA <maeda@farend.jp>2019-06-13 07:50:48 +0000
commitd16e36028fa635d736b8fc04b53408aab766d9eb (patch)
tree613cbd5c6aac13592449ad787c80ffa7495e7642 /db/migrate/20161010081600_change_journals_notes_limit.rb
parent7b40cac9ea99be25c7865279eb49a0e186a2d347 (diff)
downloadredmine-d16e36028fa635d736b8fc04b53408aab766d9eb.tar.gz
redmine-d16e36028fa635d736b8fc04b53408aab766d9eb.zip
Use Redmine::Database.mysql? instead of a regular expression (#31555).
Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@18256 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20161010081600_change_journals_notes_limit.rb')
-rw-r--r--db/migrate/20161010081600_change_journals_notes_limit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20161010081600_change_journals_notes_limit.rb b/db/migrate/20161010081600_change_journals_notes_limit.rb
index 34197bc47..1ff33bf7c 100644
--- a/db/migrate/20161010081600_change_journals_notes_limit.rb
+++ b/db/migrate/20161010081600_change_journals_notes_limit.rb
@@ -1,6 +1,6 @@
class ChangeJournalsNotesLimit < ActiveRecord::Migration[4.2]
def up
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :journals, :notes, :text, :limit => max_size
end