summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20091227112908_change_wiki_contents_text_limit.rb2
-rw-r--r--db/migrate/20140228130325_change_changesets_comments_limit.rb2
-rw-r--r--db/migrate/20161010081301_change_issues_description_limit.rb2
-rw-r--r--db/migrate/20161010081528_change_journal_details_value_limit.rb2
-rw-r--r--db/migrate/20161010081600_change_journals_notes_limit.rb2
-rw-r--r--db/migrate/20170320051650_change_repositories_extra_info_limit.rb2
-rw-r--r--db/migrate/20190315094151_change_custom_values_value_limit.rb2
7 files changed, 7 insertions, 7 deletions
diff --git a/db/migrate/20091227112908_change_wiki_contents_text_limit.rb b/db/migrate/20091227112908_change_wiki_contents_text_limit.rb
index d60a9a846..6ca99d983 100644
--- a/db/migrate/20091227112908_change_wiki_contents_text_limit.rb
+++ b/db/migrate/20091227112908_change_wiki_contents_text_limit.rb
@@ -3,7 +3,7 @@ class ChangeWikiContentsTextLimit < ActiveRecord::Migration[4.2]
# Migrates MySQL databases only
# Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818)
# Not fixed in Rails 2.3.5
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :wiki_contents, :text, :text, :limit => max_size
change_column :wiki_content_versions, :data, :binary, :limit => max_size
diff --git a/db/migrate/20140228130325_change_changesets_comments_limit.rb b/db/migrate/20140228130325_change_changesets_comments_limit.rb
index 2cff73120..480b34363 100644
--- a/db/migrate/20140228130325_change_changesets_comments_limit.rb
+++ b/db/migrate/20140228130325_change_changesets_comments_limit.rb
@@ -1,6 +1,6 @@
class ChangeChangesetsCommentsLimit < ActiveRecord::Migration[4.2]
def up
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :changesets, :comments, :text, :limit => max_size
end
diff --git a/db/migrate/20161010081301_change_issues_description_limit.rb b/db/migrate/20161010081301_change_issues_description_limit.rb
index 93fcc53ff..f428e274c 100644
--- a/db/migrate/20161010081301_change_issues_description_limit.rb
+++ b/db/migrate/20161010081301_change_issues_description_limit.rb
@@ -1,6 +1,6 @@
class ChangeIssuesDescriptionLimit < ActiveRecord::Migration[4.2]
def up
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :issues, :description, :text, :limit => max_size
end
diff --git a/db/migrate/20161010081528_change_journal_details_value_limit.rb b/db/migrate/20161010081528_change_journal_details_value_limit.rb
index d83fbacd6..4064faafb 100644
--- a/db/migrate/20161010081528_change_journal_details_value_limit.rb
+++ b/db/migrate/20161010081528_change_journal_details_value_limit.rb
@@ -1,6 +1,6 @@
class ChangeJournalDetailsValueLimit < ActiveRecord::Migration[4.2]
def up
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :journal_details, :value, :text, :limit => max_size
change_column :journal_details, :old_value, :text, :limit => max_size
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
diff --git a/db/migrate/20170320051650_change_repositories_extra_info_limit.rb b/db/migrate/20170320051650_change_repositories_extra_info_limit.rb
index 104111a39..1052efc20 100644
--- a/db/migrate/20170320051650_change_repositories_extra_info_limit.rb
+++ b/db/migrate/20170320051650_change_repositories_extra_info_limit.rb
@@ -1,6 +1,6 @@
class ChangeRepositoriesExtraInfoLimit < ActiveRecord::Migration[4.2]
def up
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :repositories, :extra_info, :text, :limit => max_size
end
diff --git a/db/migrate/20190315094151_change_custom_values_value_limit.rb b/db/migrate/20190315094151_change_custom_values_value_limit.rb
index 58e43f728..a1d691241 100644
--- a/db/migrate/20190315094151_change_custom_values_value_limit.rb
+++ b/db/migrate/20190315094151_change_custom_values_value_limit.rb
@@ -1,6 +1,6 @@
class ChangeCustomValuesValueLimit < ActiveRecord::Migration[5.2]
def up
- if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
+ if Redmine::Database.mysql?
max_size = 16.megabytes
change_column :custom_values, :value, :text, :limit => max_size
end