mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 07:46:17 +01:00
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
This commit is contained in:
@@ -3,7 +3,7 @@ class ChangeWikiContentsTextLimit < ActiveRecord::Migration[4.2]
|
|||||||
# Migrates MySQL databases only
|
# Migrates MySQL databases only
|
||||||
# Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818)
|
# Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818)
|
||||||
# Not fixed in Rails 2.3.5
|
# Not fixed in Rails 2.3.5
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :wiki_contents, :text, :text, :limit => max_size
|
change_column :wiki_contents, :text, :text, :limit => max_size
|
||||||
change_column :wiki_content_versions, :data, :binary, :limit => max_size
|
change_column :wiki_content_versions, :data, :binary, :limit => max_size
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ChangeChangesetsCommentsLimit < ActiveRecord::Migration[4.2]
|
class ChangeChangesetsCommentsLimit < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :changesets, :comments, :text, :limit => max_size
|
change_column :changesets, :comments, :text, :limit => max_size
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ChangeIssuesDescriptionLimit < ActiveRecord::Migration[4.2]
|
class ChangeIssuesDescriptionLimit < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :issues, :description, :text, :limit => max_size
|
change_column :issues, :description, :text, :limit => max_size
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ChangeJournalDetailsValueLimit < ActiveRecord::Migration[4.2]
|
class ChangeJournalDetailsValueLimit < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :journal_details, :value, :text, :limit => max_size
|
change_column :journal_details, :value, :text, :limit => max_size
|
||||||
change_column :journal_details, :old_value, :text, :limit => max_size
|
change_column :journal_details, :old_value, :text, :limit => max_size
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ChangeJournalsNotesLimit < ActiveRecord::Migration[4.2]
|
class ChangeJournalsNotesLimit < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :journals, :notes, :text, :limit => max_size
|
change_column :journals, :notes, :text, :limit => max_size
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ChangeRepositoriesExtraInfoLimit < ActiveRecord::Migration[4.2]
|
class ChangeRepositoriesExtraInfoLimit < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :repositories, :extra_info, :text, :limit => max_size
|
change_column :repositories, :extra_info, :text, :limit => max_size
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class ChangeCustomValuesValueLimit < ActiveRecord::Migration[5.2]
|
class ChangeCustomValuesValueLimit < ActiveRecord::Migration[5.2]
|
||||||
def up
|
def up
|
||||||
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i
|
if Redmine::Database.mysql?
|
||||||
max_size = 16.megabytes
|
max_size = 16.megabytes
|
||||||
change_column :custom_values, :value, :text, :limit => max_size
|
change_column :custom_values, :value, :text, :limit => max_size
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user