diff options
Diffstat (limited to 'db')
281 files changed, 289 insertions, 290 deletions
diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb index 15d783c45..1cd569403 100644 --- a/db/migrate/001_setup.rb +++ b/db/migrate/001_setup.rb @@ -15,10 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -class Setup < ActiveRecord::Migration +class Setup < ActiveRecord::Migration[4.2] class User < ActiveRecord::Base - attr_protected :id end # model removed diff --git a/db/migrate/002_issue_move.rb b/db/migrate/002_issue_move.rb index 98e95d3b9..d5966f04e 100644 --- a/db/migrate/002_issue_move.rb +++ b/db/migrate/002_issue_move.rb @@ -1,4 +1,4 @@ -class IssueMove < ActiveRecord::Migration +class IssueMove < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/003_issue_add_note.rb b/db/migrate/003_issue_add_note.rb index dabdb858f..9f899a80f 100644 --- a/db/migrate/003_issue_add_note.rb +++ b/db/migrate/003_issue_add_note.rb @@ -1,4 +1,4 @@ -class IssueAddNote < ActiveRecord::Migration +class IssueAddNote < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/004_export_pdf.rb b/db/migrate/004_export_pdf.rb index 8d4ba0b3a..ac7ef2627 100644 --- a/db/migrate/004_export_pdf.rb +++ b/db/migrate/004_export_pdf.rb @@ -1,4 +1,4 @@ -class ExportPdf < ActiveRecord::Migration +class ExportPdf < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/005_issue_start_date.rb b/db/migrate/005_issue_start_date.rb index 3d1693fc6..93decfb35 100644 --- a/db/migrate/005_issue_start_date.rb +++ b/db/migrate/005_issue_start_date.rb @@ -1,4 +1,4 @@ -class IssueStartDate < ActiveRecord::Migration +class IssueStartDate < ActiveRecord::Migration[4.2] def self.up add_column :issues, :start_date, :date add_column :issues, :done_ratio, :integer, :default => 0, :null => false diff --git a/db/migrate/006_calendar_and_activity.rb b/db/migrate/006_calendar_and_activity.rb index a30979a21..3ff204c62 100644 --- a/db/migrate/006_calendar_and_activity.rb +++ b/db/migrate/006_calendar_and_activity.rb @@ -1,4 +1,4 @@ -class CalendarAndActivity < ActiveRecord::Migration +class CalendarAndActivity < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/007_create_journals.rb b/db/migrate/007_create_journals.rb index 63bdd2374..0d1201406 100644 --- a/db/migrate/007_create_journals.rb +++ b/db/migrate/007_create_journals.rb @@ -1,4 +1,4 @@ -class CreateJournals < ActiveRecord::Migration +class CreateJournals < ActiveRecord::Migration[4.2] # model removed, but needed for data migration class IssueHistory < ActiveRecord::Base; belongs_to :issue; end diff --git a/db/migrate/008_create_user_preferences.rb b/db/migrate/008_create_user_preferences.rb index 80ae1cdf9..b782b179e 100644 --- a/db/migrate/008_create_user_preferences.rb +++ b/db/migrate/008_create_user_preferences.rb @@ -1,4 +1,4 @@ -class CreateUserPreferences < ActiveRecord::Migration +class CreateUserPreferences < ActiveRecord::Migration[4.2] def self.up create_table :user_preferences do |t| t.column "user_id", :integer, :default => 0, :null => false diff --git a/db/migrate/009_add_hide_mail_pref.rb b/db/migrate/009_add_hide_mail_pref.rb index a22eafd93..8dd3399c9 100644 --- a/db/migrate/009_add_hide_mail_pref.rb +++ b/db/migrate/009_add_hide_mail_pref.rb @@ -1,4 +1,4 @@ -class AddHideMailPref < ActiveRecord::Migration +class AddHideMailPref < ActiveRecord::Migration[4.2] def self.up add_column :user_preferences, :hide_mail, :boolean, :default => false end diff --git a/db/migrate/010_create_comments.rb b/db/migrate/010_create_comments.rb index 29e1116af..c711c748a 100644 --- a/db/migrate/010_create_comments.rb +++ b/db/migrate/010_create_comments.rb @@ -1,4 +1,4 @@ -class CreateComments < ActiveRecord::Migration +class CreateComments < ActiveRecord::Migration[4.2] def self.up create_table :comments do |t| t.column :commented_type, :string, :limit => 30, :default => "", :null => false diff --git a/db/migrate/011_add_news_comments_count.rb b/db/migrate/011_add_news_comments_count.rb index a24743999..01a283345 100644 --- a/db/migrate/011_add_news_comments_count.rb +++ b/db/migrate/011_add_news_comments_count.rb @@ -1,4 +1,4 @@ -class AddNewsCommentsCount < ActiveRecord::Migration +class AddNewsCommentsCount < ActiveRecord::Migration[4.2] def self.up add_column :news, :comments_count, :integer, :default => 0, :null => false end diff --git a/db/migrate/012_add_comments_permissions.rb b/db/migrate/012_add_comments_permissions.rb index 91eed6443..e82fb89e9 100644 --- a/db/migrate/012_add_comments_permissions.rb +++ b/db/migrate/012_add_comments_permissions.rb @@ -1,4 +1,4 @@ -class AddCommentsPermissions < ActiveRecord::Migration +class AddCommentsPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/013_create_queries.rb b/db/migrate/013_create_queries.rb index e0e8c90c0..578472590 100644 --- a/db/migrate/013_create_queries.rb +++ b/db/migrate/013_create_queries.rb @@ -1,4 +1,4 @@ -class CreateQueries < ActiveRecord::Migration +class CreateQueries < ActiveRecord::Migration[4.2] def self.up create_table :queries, :force => true do |t| t.column "project_id", :integer diff --git a/db/migrate/014_add_queries_permissions.rb b/db/migrate/014_add_queries_permissions.rb index ae1f2455d..07f974900 100644 --- a/db/migrate/014_add_queries_permissions.rb +++ b/db/migrate/014_add_queries_permissions.rb @@ -1,4 +1,4 @@ -class AddQueriesPermissions < ActiveRecord::Migration +class AddQueriesPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/015_create_repositories.rb b/db/migrate/015_create_repositories.rb index d8c0524b3..e8e92bdb9 100644 --- a/db/migrate/015_create_repositories.rb +++ b/db/migrate/015_create_repositories.rb @@ -1,4 +1,4 @@ -class CreateRepositories < ActiveRecord::Migration +class CreateRepositories < ActiveRecord::Migration[4.2] def self.up create_table :repositories, :force => true do |t| t.column "project_id", :integer, :default => 0, :null => false diff --git a/db/migrate/016_add_repositories_permissions.rb b/db/migrate/016_add_repositories_permissions.rb index 9fcddb09c..217df3cae 100644 --- a/db/migrate/016_add_repositories_permissions.rb +++ b/db/migrate/016_add_repositories_permissions.rb @@ -1,4 +1,4 @@ -class AddRepositoriesPermissions < ActiveRecord::Migration +class AddRepositoriesPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/017_create_settings.rb b/db/migrate/017_create_settings.rb index 99f96adf8..777e36ed6 100644 --- a/db/migrate/017_create_settings.rb +++ b/db/migrate/017_create_settings.rb @@ -1,4 +1,4 @@ -class CreateSettings < ActiveRecord::Migration +class CreateSettings < ActiveRecord::Migration[4.2] def self.up create_table :settings, :force => true do |t| t.column "name", :string, :limit => 30, :default => "", :null => false diff --git a/db/migrate/018_set_doc_and_files_notifications.rb b/db/migrate/018_set_doc_and_files_notifications.rb index f260bebc6..aca687385 100644 --- a/db/migrate/018_set_doc_and_files_notifications.rb +++ b/db/migrate/018_set_doc_and_files_notifications.rb @@ -1,4 +1,4 @@ -class SetDocAndFilesNotifications < ActiveRecord::Migration +class SetDocAndFilesNotifications < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/019_add_issue_status_position.rb b/db/migrate/019_add_issue_status_position.rb index 012f97c22..1536bdd0a 100644 --- a/db/migrate/019_add_issue_status_position.rb +++ b/db/migrate/019_add_issue_status_position.rb @@ -1,4 +1,4 @@ -class AddIssueStatusPosition < ActiveRecord::Migration +class AddIssueStatusPosition < ActiveRecord::Migration[4.2] def self.up add_column :issue_statuses, :position, :integer, :default => 1 IssueStatus.all.each_with_index {|status, i| status.update_attribute(:position, i+1)} diff --git a/db/migrate/020_add_role_position.rb b/db/migrate/020_add_role_position.rb index 48ac89a36..39a678e1a 100644 --- a/db/migrate/020_add_role_position.rb +++ b/db/migrate/020_add_role_position.rb @@ -1,4 +1,4 @@ -class AddRolePosition < ActiveRecord::Migration +class AddRolePosition < ActiveRecord::Migration[4.2] def self.up add_column :roles, :position, :integer, :default => 1 Role.all.each_with_index {|role, i| role.update_attribute(:position, i+1)} diff --git a/db/migrate/021_add_tracker_position.rb b/db/migrate/021_add_tracker_position.rb index 5fa8a3185..dca65d109 100644 --- a/db/migrate/021_add_tracker_position.rb +++ b/db/migrate/021_add_tracker_position.rb @@ -1,4 +1,4 @@ -class AddTrackerPosition < ActiveRecord::Migration +class AddTrackerPosition < ActiveRecord::Migration[4.2] def self.up add_column :trackers, :position, :integer, :default => 1 Tracker.all.each_with_index {|tracker, i| tracker.update_attribute(:position, i+1)} diff --git a/db/migrate/022_serialize_possibles_values.rb b/db/migrate/022_serialize_possibles_values.rb index 3e9fed0a1..66905c9c6 100644 --- a/db/migrate/022_serialize_possibles_values.rb +++ b/db/migrate/022_serialize_possibles_values.rb @@ -1,4 +1,4 @@ -class SerializePossiblesValues < ActiveRecord::Migration +class SerializePossiblesValues < ActiveRecord::Migration[4.2] def self.up CustomField.all.each do |field| if field.possible_values and field.possible_values.is_a? String diff --git a/db/migrate/023_add_tracker_is_in_roadmap.rb b/db/migrate/023_add_tracker_is_in_roadmap.rb index 82ef87bba..727b1a803 100644 --- a/db/migrate/023_add_tracker_is_in_roadmap.rb +++ b/db/migrate/023_add_tracker_is_in_roadmap.rb @@ -1,4 +1,4 @@ -class AddTrackerIsInRoadmap < ActiveRecord::Migration +class AddTrackerIsInRoadmap < ActiveRecord::Migration[4.2] def self.up add_column :trackers, :is_in_roadmap, :boolean, :default => true, :null => false end diff --git a/db/migrate/024_add_roadmap_permission.rb b/db/migrate/024_add_roadmap_permission.rb index f521e6025..72aeaeded 100644 --- a/db/migrate/024_add_roadmap_permission.rb +++ b/db/migrate/024_add_roadmap_permission.rb @@ -1,4 +1,4 @@ -class AddRoadmapPermission < ActiveRecord::Migration +class AddRoadmapPermission < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/025_add_search_permission.rb b/db/migrate/025_add_search_permission.rb index 7f1c5c6fc..782eeb286 100644 --- a/db/migrate/025_add_search_permission.rb +++ b/db/migrate/025_add_search_permission.rb @@ -1,4 +1,4 @@ -class AddSearchPermission < ActiveRecord::Migration +class AddSearchPermission < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/026_add_repository_login_and_password.rb b/db/migrate/026_add_repository_login_and_password.rb index 5fc919725..e26c2333c 100644 --- a/db/migrate/026_add_repository_login_and_password.rb +++ b/db/migrate/026_add_repository_login_and_password.rb @@ -1,4 +1,4 @@ -class AddRepositoryLoginAndPassword < ActiveRecord::Migration +class AddRepositoryLoginAndPassword < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :login, :string, :limit => 60, :default => "" add_column :repositories, :password, :string, :limit => 60, :default => "" diff --git a/db/migrate/027_create_wikis.rb b/db/migrate/027_create_wikis.rb index 284eee2e2..c40481488 100644 --- a/db/migrate/027_create_wikis.rb +++ b/db/migrate/027_create_wikis.rb @@ -1,4 +1,4 @@ -class CreateWikis < ActiveRecord::Migration +class CreateWikis < ActiveRecord::Migration[4.2] def self.up create_table :wikis do |t| t.column :project_id, :integer, :null => false diff --git a/db/migrate/028_create_wiki_pages.rb b/db/migrate/028_create_wiki_pages.rb index e2282125a..95fd6b59b 100644 --- a/db/migrate/028_create_wiki_pages.rb +++ b/db/migrate/028_create_wiki_pages.rb @@ -1,4 +1,4 @@ -class CreateWikiPages < ActiveRecord::Migration +class CreateWikiPages < ActiveRecord::Migration[4.2] def self.up create_table :wiki_pages do |t| t.column :wiki_id, :integer, :null => false diff --git a/db/migrate/029_create_wiki_contents.rb b/db/migrate/029_create_wiki_contents.rb index 5b6a22f94..662488405 100644 --- a/db/migrate/029_create_wiki_contents.rb +++ b/db/migrate/029_create_wiki_contents.rb @@ -1,4 +1,4 @@ -class CreateWikiContents < ActiveRecord::Migration +class CreateWikiContents < ActiveRecord::Migration[4.2] def self.up create_table :wiki_contents do |t| t.column :page_id, :integer, :null => false diff --git a/db/migrate/030_add_projects_feeds_permissions.rb b/db/migrate/030_add_projects_feeds_permissions.rb index 866cc39ae..29e31ab14 100644 --- a/db/migrate/030_add_projects_feeds_permissions.rb +++ b/db/migrate/030_add_projects_feeds_permissions.rb @@ -1,4 +1,4 @@ -class AddProjectsFeedsPermissions < ActiveRecord::Migration +class AddProjectsFeedsPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/031_add_repository_root_url.rb b/db/migrate/031_add_repository_root_url.rb index df57809c7..96ac761e4 100644 --- a/db/migrate/031_add_repository_root_url.rb +++ b/db/migrate/031_add_repository_root_url.rb @@ -1,4 +1,4 @@ -class AddRepositoryRootUrl < ActiveRecord::Migration +class AddRepositoryRootUrl < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :root_url, :string, :limit => 255, :default => "" end diff --git a/db/migrate/032_create_time_entries.rb b/db/migrate/032_create_time_entries.rb index 9b9a54eb1..0e93dca23 100644 --- a/db/migrate/032_create_time_entries.rb +++ b/db/migrate/032_create_time_entries.rb @@ -1,4 +1,4 @@ -class CreateTimeEntries < ActiveRecord::Migration +class CreateTimeEntries < ActiveRecord::Migration[4.2] def self.up create_table :time_entries do |t| t.column :project_id, :integer, :null => false diff --git a/db/migrate/033_add_timelog_permissions.rb b/db/migrate/033_add_timelog_permissions.rb index 58e2c436a..42889f1e7 100644 --- a/db/migrate/033_add_timelog_permissions.rb +++ b/db/migrate/033_add_timelog_permissions.rb @@ -1,4 +1,4 @@ -class AddTimelogPermissions < ActiveRecord::Migration +class AddTimelogPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/034_create_changesets.rb b/db/migrate/034_create_changesets.rb index 612fd46bb..e0180a041 100644 --- a/db/migrate/034_create_changesets.rb +++ b/db/migrate/034_create_changesets.rb @@ -1,4 +1,4 @@ -class CreateChangesets < ActiveRecord::Migration +class CreateChangesets < ActiveRecord::Migration[4.2] def self.up create_table :changesets do |t| t.column :repository_id, :integer, :null => false diff --git a/db/migrate/035_create_changes.rb b/db/migrate/035_create_changes.rb index fa0cfac3f..ed62e4c31 100644 --- a/db/migrate/035_create_changes.rb +++ b/db/migrate/035_create_changes.rb @@ -1,4 +1,4 @@ -class CreateChanges < ActiveRecord::Migration +class CreateChanges < ActiveRecord::Migration[4.2] def self.up create_table :changes do |t| t.column :changeset_id, :integer, :null => false diff --git a/db/migrate/036_add_changeset_commit_date.rb b/db/migrate/036_add_changeset_commit_date.rb index b9cc49b84..90ce52466 100644 --- a/db/migrate/036_add_changeset_commit_date.rb +++ b/db/migrate/036_add_changeset_commit_date.rb @@ -1,4 +1,4 @@ -class AddChangesetCommitDate < ActiveRecord::Migration +class AddChangesetCommitDate < ActiveRecord::Migration[4.2] def self.up add_column :changesets, :commit_date, :date Changeset.update_all "commit_date = committed_on" diff --git a/db/migrate/037_add_project_identifier.rb b/db/migrate/037_add_project_identifier.rb index 0fd8c7513..de796d6d1 100644 --- a/db/migrate/037_add_project_identifier.rb +++ b/db/migrate/037_add_project_identifier.rb @@ -1,4 +1,4 @@ -class AddProjectIdentifier < ActiveRecord::Migration +class AddProjectIdentifier < ActiveRecord::Migration[4.2] def self.up add_column :projects, :identifier, :string, :limit => 20 end diff --git a/db/migrate/038_add_custom_field_is_filter.rb b/db/migrate/038_add_custom_field_is_filter.rb index 519ee0bd5..a57c1b036 100644 --- a/db/migrate/038_add_custom_field_is_filter.rb +++ b/db/migrate/038_add_custom_field_is_filter.rb @@ -1,4 +1,4 @@ -class AddCustomFieldIsFilter < ActiveRecord::Migration +class AddCustomFieldIsFilter < ActiveRecord::Migration[4.2] def self.up add_column :custom_fields, :is_filter, :boolean, :null => false, :default => false end diff --git a/db/migrate/039_create_watchers.rb b/db/migrate/039_create_watchers.rb index 9579e19a4..d14cea464 100644 --- a/db/migrate/039_create_watchers.rb +++ b/db/migrate/039_create_watchers.rb @@ -1,4 +1,4 @@ -class CreateWatchers < ActiveRecord::Migration +class CreateWatchers < ActiveRecord::Migration[4.2] def self.up create_table :watchers do |t| t.column :watchable_type, :string, :default => "", :null => false diff --git a/db/migrate/040_create_changesets_issues.rb b/db/migrate/040_create_changesets_issues.rb index 494d3cc46..d4aad0f01 100644 --- a/db/migrate/040_create_changesets_issues.rb +++ b/db/migrate/040_create_changesets_issues.rb @@ -1,4 +1,4 @@ -class CreateChangesetsIssues < ActiveRecord::Migration +class CreateChangesetsIssues < ActiveRecord::Migration[4.2] def self.up create_table :changesets_issues, :id => false do |t| t.column :changeset_id, :integer, :null => false diff --git a/db/migrate/041_rename_comment_to_comments.rb b/db/migrate/041_rename_comment_to_comments.rb index 93677e575..dcf537bbc 100644 --- a/db/migrate/041_rename_comment_to_comments.rb +++ b/db/migrate/041_rename_comment_to_comments.rb @@ -1,4 +1,4 @@ -class RenameCommentToComments < ActiveRecord::Migration +class RenameCommentToComments < ActiveRecord::Migration[4.2] def self.up rename_column(:comments, :comment, :comments) if ActiveRecord::Base.connection.columns(Comment.table_name).detect{|c| c.name == "comment"} rename_column(:wiki_contents, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.table_name).detect{|c| c.name == "comment"} diff --git a/db/migrate/042_create_issue_relations.rb b/db/migrate/042_create_issue_relations.rb index 802c12437..98ad24fb0 100644 --- a/db/migrate/042_create_issue_relations.rb +++ b/db/migrate/042_create_issue_relations.rb @@ -1,4 +1,4 @@ -class CreateIssueRelations < ActiveRecord::Migration +class CreateIssueRelations < ActiveRecord::Migration[4.2] def self.up create_table :issue_relations do |t| t.column :issue_from_id, :integer, :null => false diff --git a/db/migrate/043_add_relations_permissions.rb b/db/migrate/043_add_relations_permissions.rb index 3c86d7e60..7250606ed 100644 --- a/db/migrate/043_add_relations_permissions.rb +++ b/db/migrate/043_add_relations_permissions.rb @@ -1,4 +1,4 @@ -class AddRelationsPermissions < ActiveRecord::Migration +class AddRelationsPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/044_set_language_length_to_five.rb b/db/migrate/044_set_language_length_to_five.rb index a417f7d70..1e600690f 100644 --- a/db/migrate/044_set_language_length_to_five.rb +++ b/db/migrate/044_set_language_length_to_five.rb @@ -1,4 +1,4 @@ -class SetLanguageLengthToFive < ActiveRecord::Migration +class SetLanguageLengthToFive < ActiveRecord::Migration[4.2] def self.up change_column :users, :language, :string, :limit => 5, :default => "" end diff --git a/db/migrate/045_create_boards.rb b/db/migrate/045_create_boards.rb index 17f2bbbe2..49b15edcc 100644 --- a/db/migrate/045_create_boards.rb +++ b/db/migrate/045_create_boards.rb @@ -1,4 +1,4 @@ -class CreateBoards < ActiveRecord::Migration +class CreateBoards < ActiveRecord::Migration[4.2] def self.up create_table :boards do |t| t.column :project_id, :integer, :null => false diff --git a/db/migrate/046_create_messages.rb b/db/migrate/046_create_messages.rb index d99aaf842..99d39c8d3 100644 --- a/db/migrate/046_create_messages.rb +++ b/db/migrate/046_create_messages.rb @@ -1,4 +1,4 @@ -class CreateMessages < ActiveRecord::Migration +class CreateMessages < ActiveRecord::Migration[4.2] def self.up create_table :messages do |t| t.column :board_id, :integer, :null => false diff --git a/db/migrate/047_add_boards_permissions.rb b/db/migrate/047_add_boards_permissions.rb index 1a9f095f7..cf7938e9f 100644 --- a/db/migrate/047_add_boards_permissions.rb +++ b/db/migrate/047_add_boards_permissions.rb @@ -1,4 +1,4 @@ -class AddBoardsPermissions < ActiveRecord::Migration +class AddBoardsPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/048_allow_null_version_effective_date.rb b/db/migrate/048_allow_null_version_effective_date.rb index 82d2a33ec..9cce1e3f6 100644 --- a/db/migrate/048_allow_null_version_effective_date.rb +++ b/db/migrate/048_allow_null_version_effective_date.rb @@ -1,4 +1,4 @@ -class AllowNullVersionEffectiveDate < ActiveRecord::Migration +class AllowNullVersionEffectiveDate < ActiveRecord::Migration[4.2] def self.up change_column :versions, :effective_date, :date, :default => nil, :null => true end diff --git a/db/migrate/049_add_wiki_destroy_page_permission.rb b/db/migrate/049_add_wiki_destroy_page_permission.rb index 803d357a1..bbeb26d8d 100644 --- a/db/migrate/049_add_wiki_destroy_page_permission.rb +++ b/db/migrate/049_add_wiki_destroy_page_permission.rb @@ -1,4 +1,4 @@ -class AddWikiDestroyPagePermission < ActiveRecord::Migration +class AddWikiDestroyPagePermission < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/050_add_wiki_attachments_permissions.rb b/db/migrate/050_add_wiki_attachments_permissions.rb index e87a46bb3..fd5f35891 100644 --- a/db/migrate/050_add_wiki_attachments_permissions.rb +++ b/db/migrate/050_add_wiki_attachments_permissions.rb @@ -1,4 +1,4 @@ -class AddWikiAttachmentsPermissions < ActiveRecord::Migration +class AddWikiAttachmentsPermissions < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/051_add_project_status.rb b/db/migrate/051_add_project_status.rb index fba36d237..e7ceade0b 100644 --- a/db/migrate/051_add_project_status.rb +++ b/db/migrate/051_add_project_status.rb @@ -1,4 +1,4 @@ -class AddProjectStatus < ActiveRecord::Migration +class AddProjectStatus < ActiveRecord::Migration[4.2] def self.up add_column :projects, :status, :integer, :default => 1, :null => false end diff --git a/db/migrate/052_add_changes_revision.rb b/db/migrate/052_add_changes_revision.rb index 6f58c1a70..e9b178480 100644 --- a/db/migrate/052_add_changes_revision.rb +++ b/db/migrate/052_add_changes_revision.rb @@ -1,4 +1,4 @@ -class AddChangesRevision < ActiveRecord::Migration +class AddChangesRevision < ActiveRecord::Migration[4.2] def self.up add_column :changes, :revision, :string end diff --git a/db/migrate/053_add_changes_branch.rb b/db/migrate/053_add_changes_branch.rb index 998ce2ba5..d8dbcfd05 100644 --- a/db/migrate/053_add_changes_branch.rb +++ b/db/migrate/053_add_changes_branch.rb @@ -1,4 +1,4 @@ -class AddChangesBranch < ActiveRecord::Migration +class AddChangesBranch < ActiveRecord::Migration[4.2] def self.up add_column :changes, :branch, :string end diff --git a/db/migrate/054_add_changesets_scmid.rb b/db/migrate/054_add_changesets_scmid.rb index 188fa6ef6..034facb4b 100644 --- a/db/migrate/054_add_changesets_scmid.rb +++ b/db/migrate/054_add_changesets_scmid.rb @@ -1,4 +1,4 @@ -class AddChangesetsScmid < ActiveRecord::Migration +class AddChangesetsScmid < ActiveRecord::Migration[4.2] def self.up add_column :changesets, :scmid, :string end diff --git a/db/migrate/055_add_repositories_type.rb b/db/migrate/055_add_repositories_type.rb index f5a71620c..5ee43cb36 100644 --- a/db/migrate/055_add_repositories_type.rb +++ b/db/migrate/055_add_repositories_type.rb @@ -1,4 +1,4 @@ -class AddRepositoriesType < ActiveRecord::Migration +class AddRepositoriesType < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :type, :string # Set class name for existing SVN repositories diff --git a/db/migrate/056_add_repositories_changes_permission.rb b/db/migrate/056_add_repositories_changes_permission.rb index 00252db43..71e23be29 100644 --- a/db/migrate/056_add_repositories_changes_permission.rb +++ b/db/migrate/056_add_repositories_changes_permission.rb @@ -1,4 +1,4 @@ -class AddRepositoriesChangesPermission < ActiveRecord::Migration +class AddRepositoriesChangesPermission < ActiveRecord::Migration[4.2] # model removed class Permission < ActiveRecord::Base; end diff --git a/db/migrate/057_add_versions_wiki_page_title.rb b/db/migrate/057_add_versions_wiki_page_title.rb index 58b8fd9a8..cb2273598 100644 --- a/db/migrate/057_add_versions_wiki_page_title.rb +++ b/db/migrate/057_add_versions_wiki_page_title.rb @@ -1,4 +1,4 @@ -class AddVersionsWikiPageTitle < ActiveRecord::Migration +class AddVersionsWikiPageTitle < ActiveRecord::Migration[4.2] def self.up add_column :versions, :wiki_page_title, :string end diff --git a/db/migrate/058_add_issue_categories_assigned_to_id.rb b/db/migrate/058_add_issue_categories_assigned_to_id.rb index 8653532e0..d17afdc9d 100644 --- a/db/migrate/058_add_issue_categories_assigned_to_id.rb +++ b/db/migrate/058_add_issue_categories_assigned_to_id.rb @@ -1,4 +1,4 @@ -class AddIssueCategoriesAssignedToId < ActiveRecord::Migration +class AddIssueCategoriesAssignedToId < ActiveRecord::Migration[4.2] def self.up add_column :issue_categories, :assigned_to_id, :integer end diff --git a/db/migrate/059_add_roles_assignable.rb b/db/migrate/059_add_roles_assignable.rb index a1ba79634..6b4b3f9ca 100644 --- a/db/migrate/059_add_roles_assignable.rb +++ b/db/migrate/059_add_roles_assignable.rb @@ -1,4 +1,4 @@ -class AddRolesAssignable < ActiveRecord::Migration +class AddRolesAssignable < ActiveRecord::Migration[4.2] def self.up add_column :roles, :assignable, :boolean, :default => true end diff --git a/db/migrate/060_change_changesets_committer_limit.rb b/db/migrate/060_change_changesets_committer_limit.rb index b05096379..d8a03b8c8 100644 --- a/db/migrate/060_change_changesets_committer_limit.rb +++ b/db/migrate/060_change_changesets_committer_limit.rb @@ -1,4 +1,4 @@ -class ChangeChangesetsCommitterLimit < ActiveRecord::Migration +class ChangeChangesetsCommitterLimit < ActiveRecord::Migration[4.2] def self.up change_column :changesets, :committer, :string, :limit => nil end diff --git a/db/migrate/061_add_roles_builtin.rb b/db/migrate/061_add_roles_builtin.rb index a8d6fe9e6..65124b02d 100644 --- a/db/migrate/061_add_roles_builtin.rb +++ b/db/migrate/061_add_roles_builtin.rb @@ -1,4 +1,4 @@ -class AddRolesBuiltin < ActiveRecord::Migration +class AddRolesBuiltin < ActiveRecord::Migration[4.2] def self.up add_column :roles, :builtin, :integer, :default => 0, :null => false end diff --git a/db/migrate/062_insert_builtin_roles.rb b/db/migrate/062_insert_builtin_roles.rb index ae3a706e2..07f902f04 100644 --- a/db/migrate/062_insert_builtin_roles.rb +++ b/db/migrate/062_insert_builtin_roles.rb @@ -1,4 +1,4 @@ -class InsertBuiltinRoles < ActiveRecord::Migration +class InsertBuiltinRoles < ActiveRecord::Migration[4.2] def self.up Role.reset_column_information nonmember = Role.new(:name => 'Non member', :position => 0) diff --git a/db/migrate/063_add_roles_permissions.rb b/db/migrate/063_add_roles_permissions.rb index 107a3af0a..a2626f82c 100644 --- a/db/migrate/063_add_roles_permissions.rb +++ b/db/migrate/063_add_roles_permissions.rb @@ -1,4 +1,4 @@ -class AddRolesPermissions < ActiveRecord::Migration +class AddRolesPermissions < ActiveRecord::Migration[4.2] def self.up add_column :roles, :permissions, :text end diff --git a/db/migrate/064_drop_permissions.rb b/db/migrate/064_drop_permissions.rb index f4ca470bf..6d39519fe 100644 --- a/db/migrate/064_drop_permissions.rb +++ b/db/migrate/064_drop_permissions.rb @@ -1,4 +1,4 @@ -class DropPermissions < ActiveRecord::Migration +class DropPermissions < ActiveRecord::Migration[4.2] def self.up drop_table :permissions drop_table :permissions_roles diff --git a/db/migrate/065_add_settings_updated_on.rb b/db/migrate/065_add_settings_updated_on.rb index 1fa002776..ab0b03a15 100644 --- a/db/migrate/065_add_settings_updated_on.rb +++ b/db/migrate/065_add_settings_updated_on.rb @@ -1,4 +1,4 @@ -class AddSettingsUpdatedOn < ActiveRecord::Migration +class AddSettingsUpdatedOn < ActiveRecord::Migration[4.2] def self.up add_column :settings, :updated_on, :timestamp # set updated_on diff --git a/db/migrate/066_add_custom_value_customized_index.rb b/db/migrate/066_add_custom_value_customized_index.rb index 1f4c40da2..da4c72570 100644 --- a/db/migrate/066_add_custom_value_customized_index.rb +++ b/db/migrate/066_add_custom_value_customized_index.rb @@ -1,4 +1,4 @@ -class AddCustomValueCustomizedIndex < ActiveRecord::Migration +class AddCustomValueCustomizedIndex < ActiveRecord::Migration[4.2] def self.up add_index :custom_values, [:customized_type, :customized_id], :name => :custom_values_customized end diff --git a/db/migrate/067_create_wiki_redirects.rb b/db/migrate/067_create_wiki_redirects.rb index dda6ba6d5..54b1d5dbd 100644 --- a/db/migrate/067_create_wiki_redirects.rb +++ b/db/migrate/067_create_wiki_redirects.rb @@ -1,4 +1,4 @@ -class CreateWikiRedirects < ActiveRecord::Migration +class CreateWikiRedirects < ActiveRecord::Migration[4.2] def self.up create_table :wiki_redirects do |t| t.column :wiki_id, :integer, :null => false diff --git a/db/migrate/068_create_enabled_modules.rb b/db/migrate/068_create_enabled_modules.rb index 88005cdb6..c836be76b 100644 --- a/db/migrate/068_create_enabled_modules.rb +++ b/db/migrate/068_create_enabled_modules.rb @@ -1,4 +1,4 @@ -class CreateEnabledModules < ActiveRecord::Migration +class CreateEnabledModules < ActiveRecord::Migration[4.2] def self.up create_table :enabled_modules do |t| t.column :project_id, :integer diff --git a/db/migrate/069_add_issues_estimated_hours.rb b/db/migrate/069_add_issues_estimated_hours.rb index 90b86e243..d651993e3 100644 --- a/db/migrate/069_add_issues_estimated_hours.rb +++ b/db/migrate/069_add_issues_estimated_hours.rb @@ -1,4 +1,4 @@ -class AddIssuesEstimatedHours < ActiveRecord::Migration +class AddIssuesEstimatedHours < ActiveRecord::Migration[4.2] def self.up add_column :issues, :estimated_hours, :float end diff --git a/db/migrate/070_change_attachments_content_type_limit.rb b/db/migrate/070_change_attachments_content_type_limit.rb index ebf6d08c3..ae9f7363a 100644 --- a/db/migrate/070_change_attachments_content_type_limit.rb +++ b/db/migrate/070_change_attachments_content_type_limit.rb @@ -1,4 +1,4 @@ -class ChangeAttachmentsContentTypeLimit < ActiveRecord::Migration +class ChangeAttachmentsContentTypeLimit < ActiveRecord::Migration[4.2] def self.up change_column :attachments, :content_type, :string, :limit => nil end diff --git a/db/migrate/071_add_queries_column_names.rb b/db/migrate/071_add_queries_column_names.rb index acaf4dab0..5f6873afb 100644 --- a/db/migrate/071_add_queries_column_names.rb +++ b/db/migrate/071_add_queries_column_names.rb @@ -1,4 +1,4 @@ -class AddQueriesColumnNames < ActiveRecord::Migration +class AddQueriesColumnNames < ActiveRecord::Migration[4.2] def self.up add_column :queries, :column_names, :text end diff --git a/db/migrate/072_add_enumerations_position.rb b/db/migrate/072_add_enumerations_position.rb index 2834abef1..804ce0096 100644 --- a/db/migrate/072_add_enumerations_position.rb +++ b/db/migrate/072_add_enumerations_position.rb @@ -1,4 +1,4 @@ -class AddEnumerationsPosition < ActiveRecord::Migration +class AddEnumerationsPosition < ActiveRecord::Migration[4.2] def self.up add_column(:enumerations, :position, :integer, :default => 1) unless Enumeration.column_names.include?('position') Enumeration.all.group_by(&:opt).each do |opt, enums| diff --git a/db/migrate/073_add_enumerations_is_default.rb b/db/migrate/073_add_enumerations_is_default.rb index 7365a1411..269cbf35a 100644 --- a/db/migrate/073_add_enumerations_is_default.rb +++ b/db/migrate/073_add_enumerations_is_default.rb @@ -1,4 +1,4 @@ -class AddEnumerationsIsDefault < ActiveRecord::Migration +class AddEnumerationsIsDefault < ActiveRecord::Migration[4.2] def self.up add_column :enumerations, :is_default, :boolean, :default => false, :null => false end diff --git a/db/migrate/074_add_auth_sources_tls.rb b/db/migrate/074_add_auth_sources_tls.rb index 3987f7036..298e39e6e 100644 --- a/db/migrate/074_add_auth_sources_tls.rb +++ b/db/migrate/074_add_auth_sources_tls.rb @@ -1,4 +1,4 @@ -class AddAuthSourcesTls < ActiveRecord::Migration +class AddAuthSourcesTls < ActiveRecord::Migration[4.2] def self.up add_column :auth_sources, :tls, :boolean, :default => false, :null => false end diff --git a/db/migrate/075_add_members_mail_notification.rb b/db/migrate/075_add_members_mail_notification.rb index d83ba8dd0..8722e95fd 100644 --- a/db/migrate/075_add_members_mail_notification.rb +++ b/db/migrate/075_add_members_mail_notification.rb @@ -1,4 +1,4 @@ -class AddMembersMailNotification < ActiveRecord::Migration +class AddMembersMailNotification < ActiveRecord::Migration[4.2] def self.up add_column :members, :mail_notification, :boolean, :default => false, :null => false end diff --git a/db/migrate/076_allow_null_position.rb b/db/migrate/076_allow_null_position.rb index afb93810a..a5f396fcd 100644 --- a/db/migrate/076_allow_null_position.rb +++ b/db/migrate/076_allow_null_position.rb @@ -1,4 +1,4 @@ -class AllowNullPosition < ActiveRecord::Migration +class AllowNullPosition < ActiveRecord::Migration[4.2] def self.up Enumeration.reset_column_information diff --git a/db/migrate/077_remove_issue_statuses_html_color.rb b/db/migrate/077_remove_issue_statuses_html_color.rb index a3e2c3f8f..fdf64ce29 100644 --- a/db/migrate/077_remove_issue_statuses_html_color.rb +++ b/db/migrate/077_remove_issue_statuses_html_color.rb @@ -1,4 +1,4 @@ -class RemoveIssueStatusesHtmlColor < ActiveRecord::Migration +class RemoveIssueStatusesHtmlColor < ActiveRecord::Migration[4.2] def self.up remove_column :issue_statuses, :html_color end diff --git a/db/migrate/078_add_custom_fields_position.rb b/db/migrate/078_add_custom_fields_position.rb index a03db4618..ebe84416b 100644 --- a/db/migrate/078_add_custom_fields_position.rb +++ b/db/migrate/078_add_custom_fields_position.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsPosition < ActiveRecord::Migration +class AddCustomFieldsPosition < ActiveRecord::Migration[4.2] def self.up add_column(:custom_fields, :position, :integer, :default => 1) CustomField.all.group_by(&:type).each do |t, fields| diff --git a/db/migrate/079_add_user_preferences_time_zone.rb b/db/migrate/079_add_user_preferences_time_zone.rb index 9e36790a9..fd3ac2c6f 100644 --- a/db/migrate/079_add_user_preferences_time_zone.rb +++ b/db/migrate/079_add_user_preferences_time_zone.rb @@ -1,4 +1,4 @@ -class AddUserPreferencesTimeZone < ActiveRecord::Migration +class AddUserPreferencesTimeZone < ActiveRecord::Migration[4.2] def self.up add_column :user_preferences, :time_zone, :string end diff --git a/db/migrate/080_add_users_type.rb b/db/migrate/080_add_users_type.rb index c907b472e..342a99583 100644 --- a/db/migrate/080_add_users_type.rb +++ b/db/migrate/080_add_users_type.rb @@ -1,4 +1,4 @@ -class AddUsersType < ActiveRecord::Migration +class AddUsersType < ActiveRecord::Migration[4.2] def self.up add_column :users, :type, :string User.update_all "type = 'User'" diff --git a/db/migrate/081_create_projects_trackers.rb b/db/migrate/081_create_projects_trackers.rb index ddb801d31..8156e39a8 100644 --- a/db/migrate/081_create_projects_trackers.rb +++ b/db/migrate/081_create_projects_trackers.rb @@ -1,4 +1,4 @@ -class CreateProjectsTrackers < ActiveRecord::Migration +class CreateProjectsTrackers < ActiveRecord::Migration[4.2] def self.up create_table :projects_trackers, :id => false do |t| t.column :project_id, :integer, :default => 0, :null => false diff --git a/db/migrate/082_add_messages_locked.rb b/db/migrate/082_add_messages_locked.rb index 20a172565..c88533e9f 100644 --- a/db/migrate/082_add_messages_locked.rb +++ b/db/migrate/082_add_messages_locked.rb @@ -1,4 +1,4 @@ -class AddMessagesLocked < ActiveRecord::Migration +class AddMessagesLocked < ActiveRecord::Migration[4.2] def self.up add_column :messages, :locked, :boolean, :default => false end diff --git a/db/migrate/083_add_messages_sticky.rb b/db/migrate/083_add_messages_sticky.rb index 8fd5d2ce3..aa6dde285 100644 --- a/db/migrate/083_add_messages_sticky.rb +++ b/db/migrate/083_add_messages_sticky.rb @@ -1,4 +1,4 @@ -class AddMessagesSticky < ActiveRecord::Migration +class AddMessagesSticky < ActiveRecord::Migration[4.2] def self.up add_column :messages, :sticky, :integer, :default => 0 end diff --git a/db/migrate/084_change_auth_sources_account_limit.rb b/db/migrate/084_change_auth_sources_account_limit.rb index cc127b439..4e2870aa0 100644 --- a/db/migrate/084_change_auth_sources_account_limit.rb +++ b/db/migrate/084_change_auth_sources_account_limit.rb @@ -1,4 +1,4 @@ -class ChangeAuthSourcesAccountLimit < ActiveRecord::Migration +class ChangeAuthSourcesAccountLimit < ActiveRecord::Migration[4.2] def self.up change_column :auth_sources, :account, :string, :limit => nil end diff --git a/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb b/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb index a59135be0..12c150440 100644 --- a/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb +++ b/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb @@ -1,4 +1,4 @@ -class AddRoleTrackerOldStatusIndexToWorkflows < ActiveRecord::Migration +class AddRoleTrackerOldStatusIndexToWorkflows < ActiveRecord::Migration[4.2] def self.up add_index :workflows, [:role_id, :tracker_id, :old_status_id], :name => :wkfs_role_tracker_old_status end diff --git a/db/migrate/086_add_custom_fields_searchable.rb b/db/migrate/086_add_custom_fields_searchable.rb index 53158d14e..5ee187577 100644 --- a/db/migrate/086_add_custom_fields_searchable.rb +++ b/db/migrate/086_add_custom_fields_searchable.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsSearchable < ActiveRecord::Migration +class AddCustomFieldsSearchable < ActiveRecord::Migration[4.2] def self.up add_column :custom_fields, :searchable, :boolean, :default => false end diff --git a/db/migrate/087_change_projects_description_to_text.rb b/db/migrate/087_change_projects_description_to_text.rb index 132e921b3..0f1d8fe92 100644 --- a/db/migrate/087_change_projects_description_to_text.rb +++ b/db/migrate/087_change_projects_description_to_text.rb @@ -1,4 +1,4 @@ -class ChangeProjectsDescriptionToText < ActiveRecord::Migration +class ChangeProjectsDescriptionToText < ActiveRecord::Migration[4.2] def self.up change_column :projects, :description, :text, :null => true, :default => nil end diff --git a/db/migrate/088_add_custom_fields_default_value.rb b/db/migrate/088_add_custom_fields_default_value.rb index 33a39ec6e..1148c0726 100644 --- a/db/migrate/088_add_custom_fields_default_value.rb +++ b/db/migrate/088_add_custom_fields_default_value.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsDefaultValue < ActiveRecord::Migration +class AddCustomFieldsDefaultValue < ActiveRecord::Migration[4.2] def self.up add_column :custom_fields, :default_value, :text end diff --git a/db/migrate/089_add_attachments_description.rb b/db/migrate/089_add_attachments_description.rb index 411dfe4d6..f2a9666b6 100644 --- a/db/migrate/089_add_attachments_description.rb +++ b/db/migrate/089_add_attachments_description.rb @@ -1,4 +1,4 @@ -class AddAttachmentsDescription < ActiveRecord::Migration +class AddAttachmentsDescription < ActiveRecord::Migration[4.2] def self.up add_column :attachments, :description, :string end diff --git a/db/migrate/090_change_versions_name_limit.rb b/db/migrate/090_change_versions_name_limit.rb index 276429727..5f34cd501 100644 --- a/db/migrate/090_change_versions_name_limit.rb +++ b/db/migrate/090_change_versions_name_limit.rb @@ -1,4 +1,4 @@ -class ChangeVersionsNameLimit < ActiveRecord::Migration +class ChangeVersionsNameLimit < ActiveRecord::Migration[4.2] def self.up change_column :versions, :name, :string, :limit => nil end diff --git a/db/migrate/091_change_changesets_revision_to_string.rb b/db/migrate/091_change_changesets_revision_to_string.rb index 64988069d..f92f8f79e 100644 --- a/db/migrate/091_change_changesets_revision_to_string.rb +++ b/db/migrate/091_change_changesets_revision_to_string.rb @@ -1,4 +1,4 @@ -class ChangeChangesetsRevisionToString < ActiveRecord::Migration +class ChangeChangesetsRevisionToString < ActiveRecord::Migration[4.2] def self.up # Some backends (eg. SQLServer 2012) do not support changing the type # of an indexed column so the index needs to be dropped first diff --git a/db/migrate/092_change_changes_from_revision_to_string.rb b/db/migrate/092_change_changes_from_revision_to_string.rb index b298a3f45..c91919cc0 100644 --- a/db/migrate/092_change_changes_from_revision_to_string.rb +++ b/db/migrate/092_change_changes_from_revision_to_string.rb @@ -1,4 +1,4 @@ -class ChangeChangesFromRevisionToString < ActiveRecord::Migration +class ChangeChangesFromRevisionToString < ActiveRecord::Migration[4.2] def self.up change_column :changes, :from_revision, :string end diff --git a/db/migrate/093_add_wiki_pages_protected.rb b/db/migrate/093_add_wiki_pages_protected.rb index 49720fbb7..6ff72d8c5 100644 --- a/db/migrate/093_add_wiki_pages_protected.rb +++ b/db/migrate/093_add_wiki_pages_protected.rb @@ -1,4 +1,4 @@ -class AddWikiPagesProtected < ActiveRecord::Migration +class AddWikiPagesProtected < ActiveRecord::Migration[4.2] def self.up add_column :wiki_pages, :protected, :boolean, :default => false, :null => false end diff --git a/db/migrate/094_change_projects_homepage_limit.rb b/db/migrate/094_change_projects_homepage_limit.rb index 98374aa4e..950c53ede 100644 --- a/db/migrate/094_change_projects_homepage_limit.rb +++ b/db/migrate/094_change_projects_homepage_limit.rb @@ -1,4 +1,4 @@ -class ChangeProjectsHomepageLimit < ActiveRecord::Migration +class ChangeProjectsHomepageLimit < ActiveRecord::Migration[4.2] def self.up change_column :projects, :homepage, :string, :limit => nil, :default => '' end diff --git a/db/migrate/095_add_wiki_pages_parent_id.rb b/db/migrate/095_add_wiki_pages_parent_id.rb index 36b922ec1..6aff1fb4e 100644 --- a/db/migrate/095_add_wiki_pages_parent_id.rb +++ b/db/migrate/095_add_wiki_pages_parent_id.rb @@ -1,4 +1,4 @@ -class AddWikiPagesParentId < ActiveRecord::Migration +class AddWikiPagesParentId < ActiveRecord::Migration[4.2] def self.up add_column :wiki_pages, :parent_id, :integer, :default => nil end diff --git a/db/migrate/096_add_commit_access_permission.rb b/db/migrate/096_add_commit_access_permission.rb index 39642cdfe..9b5fc66e6 100644 --- a/db/migrate/096_add_commit_access_permission.rb +++ b/db/migrate/096_add_commit_access_permission.rb @@ -1,4 +1,4 @@ -class AddCommitAccessPermission < ActiveRecord::Migration +class AddCommitAccessPermission < ActiveRecord::Migration[4.2] def self.up Role.all.select { |r| not r.builtin? }.each do |r| r.add_permission!(:commit_access) diff --git a/db/migrate/097_add_view_wiki_edits_permission.rb b/db/migrate/097_add_view_wiki_edits_permission.rb index cd25f3cb1..1808f72ef 100644 --- a/db/migrate/097_add_view_wiki_edits_permission.rb +++ b/db/migrate/097_add_view_wiki_edits_permission.rb @@ -1,4 +1,4 @@ -class AddViewWikiEditsPermission < ActiveRecord::Migration +class AddViewWikiEditsPermission < ActiveRecord::Migration[4.2] def self.up Role.all.each do |r| r.add_permission!(:view_wiki_edits) if r.has_permission?(:view_wiki_pages) diff --git a/db/migrate/098_set_topic_authors_as_watchers.rb b/db/migrate/098_set_topic_authors_as_watchers.rb index 1a1529561..979ae8edc 100644 --- a/db/migrate/098_set_topic_authors_as_watchers.rb +++ b/db/migrate/098_set_topic_authors_as_watchers.rb @@ -1,4 +1,4 @@ -class SetTopicAuthorsAsWatchers < ActiveRecord::Migration +class SetTopicAuthorsAsWatchers < ActiveRecord::Migration[4.2] def self.up # Sets active users who created/replied a topic as watchers of the topic # so that the new watch functionality at topic level doesn't affect notifications behaviour diff --git a/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb b/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb index 475e4d0aa..b016bfcb6 100644 --- a/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb +++ b/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb @@ -1,4 +1,4 @@ -class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration +class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration[4.2] def self.up Role.all.each do |r| r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages) diff --git a/db/migrate/100_add_changesets_user_id.rb b/db/migrate/100_add_changesets_user_id.rb index 9b25fd7bc..8b722aec6 100644 --- a/db/migrate/100_add_changesets_user_id.rb +++ b/db/migrate/100_add_changesets_user_id.rb @@ -1,4 +1,4 @@ -class AddChangesetsUserId < ActiveRecord::Migration +class AddChangesetsUserId < ActiveRecord::Migration[4.2] def self.up add_column :changesets, :user_id, :integer, :default => nil end diff --git a/db/migrate/101_populate_changesets_user_id.rb b/db/migrate/101_populate_changesets_user_id.rb index 566363f7c..7e7d81d4f 100644 --- a/db/migrate/101_populate_changesets_user_id.rb +++ b/db/migrate/101_populate_changesets_user_id.rb @@ -1,4 +1,4 @@ -class PopulateChangesetsUserId < ActiveRecord::Migration +class PopulateChangesetsUserId < ActiveRecord::Migration[4.2] def self.up committers = Changeset.connection.select_values("SELECT DISTINCT committer FROM #{Changeset.table_name}") committers.each do |committer| diff --git a/db/migrate/102_add_custom_fields_editable.rb b/db/migrate/102_add_custom_fields_editable.rb index 949f9db9d..28b73cc71 100644 --- a/db/migrate/102_add_custom_fields_editable.rb +++ b/db/migrate/102_add_custom_fields_editable.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsEditable < ActiveRecord::Migration +class AddCustomFieldsEditable < ActiveRecord::Migration[4.2] def self.up add_column :custom_fields, :editable, :boolean, :default => true end diff --git a/db/migrate/103_set_custom_fields_editable.rb b/db/migrate/103_set_custom_fields_editable.rb index 937649e61..c43846c3a 100644 --- a/db/migrate/103_set_custom_fields_editable.rb +++ b/db/migrate/103_set_custom_fields_editable.rb @@ -1,4 +1,4 @@ -class SetCustomFieldsEditable < ActiveRecord::Migration +class SetCustomFieldsEditable < ActiveRecord::Migration[4.2] def self.up UserCustomField.update_all("editable = #{CustomField.connection.quoted_false}") end diff --git a/db/migrate/104_add_projects_lft_and_rgt.rb b/db/migrate/104_add_projects_lft_and_rgt.rb index 8952c16e1..77569fc45 100644 --- a/db/migrate/104_add_projects_lft_and_rgt.rb +++ b/db/migrate/104_add_projects_lft_and_rgt.rb @@ -1,4 +1,4 @@ -class AddProjectsLftAndRgt < ActiveRecord::Migration +class AddProjectsLftAndRgt < ActiveRecord::Migration[4.2] def self.up add_column :projects, :lft, :integer add_column :projects, :rgt, :integer diff --git a/db/migrate/105_build_projects_tree.rb b/db/migrate/105_build_projects_tree.rb index cd35373c0..27ca3dfba 100644 --- a/db/migrate/105_build_projects_tree.rb +++ b/db/migrate/105_build_projects_tree.rb @@ -1,4 +1,4 @@ -class BuildProjectsTree < ActiveRecord::Migration +class BuildProjectsTree < ActiveRecord::Migration[4.2] def self.up Project.rebuild_tree! end diff --git a/db/migrate/106_remove_projects_projects_count.rb b/db/migrate/106_remove_projects_projects_count.rb index 68bb3d115..4f14974da 100644 --- a/db/migrate/106_remove_projects_projects_count.rb +++ b/db/migrate/106_remove_projects_projects_count.rb @@ -1,4 +1,4 @@ -class RemoveProjectsProjectsCount < ActiveRecord::Migration +class RemoveProjectsProjectsCount < ActiveRecord::Migration[4.2] def self.up remove_column :projects, :projects_count end diff --git a/db/migrate/107_add_open_id_authentication_tables.rb b/db/migrate/107_add_open_id_authentication_tables.rb index caae0d8c7..3d6d6e9b5 100644 --- a/db/migrate/107_add_open_id_authentication_tables.rb +++ b/db/migrate/107_add_open_id_authentication_tables.rb @@ -1,4 +1,4 @@ -class AddOpenIdAuthenticationTables < ActiveRecord::Migration +class AddOpenIdAuthenticationTables < ActiveRecord::Migration[4.2] def self.up create_table :open_id_authentication_associations, :force => true do |t| t.integer :issued, :lifetime diff --git a/db/migrate/108_add_identity_url_to_users.rb b/db/migrate/108_add_identity_url_to_users.rb index f5af77b24..009743c0b 100644 --- a/db/migrate/108_add_identity_url_to_users.rb +++ b/db/migrate/108_add_identity_url_to_users.rb @@ -1,4 +1,4 @@ -class AddIdentityUrlToUsers < ActiveRecord::Migration +class AddIdentityUrlToUsers < ActiveRecord::Migration[4.2] def self.up add_column :users, :identity_url, :string end diff --git a/db/migrate/20090214190337_add_watchers_user_id_type_index.rb b/db/migrate/20090214190337_add_watchers_user_id_type_index.rb index 7ff4e542c..c60a3b2ee 100644 --- a/db/migrate/20090214190337_add_watchers_user_id_type_index.rb +++ b/db/migrate/20090214190337_add_watchers_user_id_type_index.rb @@ -1,4 +1,4 @@ -class AddWatchersUserIdTypeIndex < ActiveRecord::Migration +class AddWatchersUserIdTypeIndex < ActiveRecord::Migration[4.2] def self.up add_index :watchers, [:user_id, :watchable_type], :name => :watchers_user_id_type end diff --git a/db/migrate/20090312172426_add_queries_sort_criteria.rb b/db/migrate/20090312172426_add_queries_sort_criteria.rb index 743ed42ff..c5bc030fb 100644 --- a/db/migrate/20090312172426_add_queries_sort_criteria.rb +++ b/db/migrate/20090312172426_add_queries_sort_criteria.rb @@ -1,4 +1,4 @@ -class AddQueriesSortCriteria < ActiveRecord::Migration +class AddQueriesSortCriteria < ActiveRecord::Migration[4.2] def self.up add_column :queries, :sort_criteria, :text end diff --git a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb index f4e3a26d2..24fb6c293 100644 --- a/db/migrate/20090312194159_add_projects_trackers_unique_index.rb +++ b/db/migrate/20090312194159_add_projects_trackers_unique_index.rb @@ -1,4 +1,4 @@ -class AddProjectsTrackersUniqueIndex < ActiveRecord::Migration +class AddProjectsTrackersUniqueIndex < ActiveRecord::Migration[4.2] def self.up remove_duplicates add_index :projects_trackers, [:project_id, :tracker_id], :name => :projects_trackers_unique, :unique => true diff --git a/db/migrate/20090318181151_extend_settings_name.rb b/db/migrate/20090318181151_extend_settings_name.rb index eca03d555..1091dac7e 100644 --- a/db/migrate/20090318181151_extend_settings_name.rb +++ b/db/migrate/20090318181151_extend_settings_name.rb @@ -1,4 +1,4 @@ -class ExtendSettingsName < ActiveRecord::Migration +class ExtendSettingsName < ActiveRecord::Migration[4.2] def self.up change_column :settings, :name, :string, :limit => 255, :default => '', :null => false end diff --git a/db/migrate/20090323224724_add_type_to_enumerations.rb b/db/migrate/20090323224724_add_type_to_enumerations.rb index c2aef5e4a..100468d4b 100644 --- a/db/migrate/20090323224724_add_type_to_enumerations.rb +++ b/db/migrate/20090323224724_add_type_to_enumerations.rb @@ -1,4 +1,4 @@ -class AddTypeToEnumerations < ActiveRecord::Migration +class AddTypeToEnumerations < ActiveRecord::Migration[4.2] def self.up add_column :enumerations, :type, :string end diff --git a/db/migrate/20090401221305_update_enumerations_to_sti.rb b/db/migrate/20090401221305_update_enumerations_to_sti.rb index 031dd4656..1ba41076e 100644 --- a/db/migrate/20090401221305_update_enumerations_to_sti.rb +++ b/db/migrate/20090401221305_update_enumerations_to_sti.rb @@ -1,4 +1,4 @@ -class UpdateEnumerationsToSti < ActiveRecord::Migration +class UpdateEnumerationsToSti < ActiveRecord::Migration[4.2] def self.up Enumeration.where("opt = 'IPRI'").update_all("type = 'IssuePriority'") Enumeration.where("opt = 'DCAT'").update_all("type = 'DocumentCategory'") diff --git a/db/migrate/20090401231134_add_active_field_to_enumerations.rb b/db/migrate/20090401231134_add_active_field_to_enumerations.rb index 55824fa65..5b9e432b5 100644 --- a/db/migrate/20090401231134_add_active_field_to_enumerations.rb +++ b/db/migrate/20090401231134_add_active_field_to_enumerations.rb @@ -1,4 +1,4 @@ -class AddActiveFieldToEnumerations < ActiveRecord::Migration +class AddActiveFieldToEnumerations < ActiveRecord::Migration[4.2] def self.up add_column :enumerations, :active, :boolean, :default => true, :null => false end diff --git a/db/migrate/20090403001910_add_project_to_enumerations.rb b/db/migrate/20090403001910_add_project_to_enumerations.rb index a3db6d51e..a90928949 100644 --- a/db/migrate/20090403001910_add_project_to_enumerations.rb +++ b/db/migrate/20090403001910_add_project_to_enumerations.rb @@ -1,4 +1,4 @@ -class AddProjectToEnumerations < ActiveRecord::Migration +class AddProjectToEnumerations < ActiveRecord::Migration[4.2] def self.up add_column :enumerations, :project_id, :integer, :null => true, :default => nil add_index :enumerations, :project_id diff --git a/db/migrate/20090406161854_add_parent_id_to_enumerations.rb b/db/migrate/20090406161854_add_parent_id_to_enumerations.rb index 2c1b1780d..546c0b704 100644 --- a/db/migrate/20090406161854_add_parent_id_to_enumerations.rb +++ b/db/migrate/20090406161854_add_parent_id_to_enumerations.rb @@ -1,4 +1,4 @@ -class AddParentIdToEnumerations < ActiveRecord::Migration +class AddParentIdToEnumerations < ActiveRecord::Migration[4.2] def self.up add_column :enumerations, :parent_id, :integer, :null => true, :default => nil end diff --git a/db/migrate/20090425161243_add_queries_group_by.rb b/db/migrate/20090425161243_add_queries_group_by.rb index 1405f3d0b..07e1c5938 100644 --- a/db/migrate/20090425161243_add_queries_group_by.rb +++ b/db/migrate/20090425161243_add_queries_group_by.rb @@ -1,4 +1,4 @@ -class AddQueriesGroupBy < ActiveRecord::Migration +class AddQueriesGroupBy < ActiveRecord::Migration[4.2] def self.up add_column :queries, :group_by, :string end diff --git a/db/migrate/20090503121501_create_member_roles.rb b/db/migrate/20090503121501_create_member_roles.rb index 38519ea7c..69ce2e81f 100644 --- a/db/migrate/20090503121501_create_member_roles.rb +++ b/db/migrate/20090503121501_create_member_roles.rb @@ -1,4 +1,4 @@ -class CreateMemberRoles < ActiveRecord::Migration +class CreateMemberRoles < ActiveRecord::Migration[4.2] def self.up create_table :member_roles do |t| t.column :member_id, :integer, :null => false diff --git a/db/migrate/20090503121505_populate_member_roles.rb b/db/migrate/20090503121505_populate_member_roles.rb index 285d7e51a..e5f246afa 100644 --- a/db/migrate/20090503121505_populate_member_roles.rb +++ b/db/migrate/20090503121505_populate_member_roles.rb @@ -1,4 +1,4 @@ -class PopulateMemberRoles < ActiveRecord::Migration +class PopulateMemberRoles < ActiveRecord::Migration[4.2] def self.up MemberRole.delete_all Member.all.each do |member| diff --git a/db/migrate/20090503121510_drop_members_role_id.rb b/db/migrate/20090503121510_drop_members_role_id.rb index c28119910..7b8e3cf9a 100644 --- a/db/migrate/20090503121510_drop_members_role_id.rb +++ b/db/migrate/20090503121510_drop_members_role_id.rb @@ -1,4 +1,4 @@ -class DropMembersRoleId < ActiveRecord::Migration +class DropMembersRoleId < ActiveRecord::Migration[4.2] def self.up remove_column :members, :role_id end diff --git a/db/migrate/20090614091200_fix_messages_sticky_null.rb b/db/migrate/20090614091200_fix_messages_sticky_null.rb index fcb8b4504..66ea4bf2c 100644 --- a/db/migrate/20090614091200_fix_messages_sticky_null.rb +++ b/db/migrate/20090614091200_fix_messages_sticky_null.rb @@ -1,4 +1,4 @@ -class FixMessagesStickyNull < ActiveRecord::Migration +class FixMessagesStickyNull < ActiveRecord::Migration[4.2] def self.up Message.where('sticky IS NULL').update_all('sticky = 0') end diff --git a/db/migrate/20090704172350_populate_users_type.rb b/db/migrate/20090704172350_populate_users_type.rb index e7c72d532..8342f9774 100644 --- a/db/migrate/20090704172350_populate_users_type.rb +++ b/db/migrate/20090704172350_populate_users_type.rb @@ -1,4 +1,4 @@ -class PopulateUsersType < ActiveRecord::Migration +class PopulateUsersType < ActiveRecord::Migration[4.2] def self.up Principal.where("type IS NULL").update_all("type = 'User'") end diff --git a/db/migrate/20090704172355_create_groups_users.rb b/db/migrate/20090704172355_create_groups_users.rb index 9ce03b95b..6d676304f 100644 --- a/db/migrate/20090704172355_create_groups_users.rb +++ b/db/migrate/20090704172355_create_groups_users.rb @@ -1,4 +1,4 @@ -class CreateGroupsUsers < ActiveRecord::Migration +class CreateGroupsUsers < ActiveRecord::Migration[4.2] def self.up create_table :groups_users, :id => false do |t| t.column :group_id, :integer, :null => false diff --git a/db/migrate/20090704172358_add_member_roles_inherited_from.rb b/db/migrate/20090704172358_add_member_roles_inherited_from.rb index 4ffa52389..45f0e45a4 100644 --- a/db/migrate/20090704172358_add_member_roles_inherited_from.rb +++ b/db/migrate/20090704172358_add_member_roles_inherited_from.rb @@ -1,4 +1,4 @@ -class AddMemberRolesInheritedFrom < ActiveRecord::Migration +class AddMemberRolesInheritedFrom < ActiveRecord::Migration[4.2] def self.up add_column :member_roles, :inherited_from, :integer end diff --git a/db/migrate/20091010093521_fix_users_custom_values.rb b/db/migrate/20091010093521_fix_users_custom_values.rb index 93c5cfba2..38cabac86 100644 --- a/db/migrate/20091010093521_fix_users_custom_values.rb +++ b/db/migrate/20091010093521_fix_users_custom_values.rb @@ -1,4 +1,4 @@ -class FixUsersCustomValues < ActiveRecord::Migration +class FixUsersCustomValues < ActiveRecord::Migration[4.2] def self.up CustomValue.where("customized_type = 'User'"). update_all("customized_type = 'Principal'") diff --git a/db/migrate/20091017212227_add_missing_indexes_to_workflows.rb b/db/migrate/20091017212227_add_missing_indexes_to_workflows.rb index 13fa0137e..bf84c4f03 100644 --- a/db/migrate/20091017212227_add_missing_indexes_to_workflows.rb +++ b/db/migrate/20091017212227_add_missing_indexes_to_workflows.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToWorkflows < ActiveRecord::Migration +class AddMissingIndexesToWorkflows < ActiveRecord::Migration[4.2] def self.up add_index :workflows, :old_status_id add_index :workflows, :role_id diff --git a/db/migrate/20091017212457_add_missing_indexes_to_custom_fields_projects.rb b/db/migrate/20091017212457_add_missing_indexes_to_custom_fields_projects.rb index b95f54327..235f1e6ed 100644 --- a/db/migrate/20091017212457_add_missing_indexes_to_custom_fields_projects.rb +++ b/db/migrate/20091017212457_add_missing_indexes_to_custom_fields_projects.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToCustomFieldsProjects < ActiveRecord::Migration +class AddMissingIndexesToCustomFieldsProjects < ActiveRecord::Migration[4.2] def self.up add_index :custom_fields_projects, [:custom_field_id, :project_id] end diff --git a/db/migrate/20091017212644_add_missing_indexes_to_messages.rb b/db/migrate/20091017212644_add_missing_indexes_to_messages.rb index 23c272995..06897e1c0 100644 --- a/db/migrate/20091017212644_add_missing_indexes_to_messages.rb +++ b/db/migrate/20091017212644_add_missing_indexes_to_messages.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToMessages < ActiveRecord::Migration +class AddMissingIndexesToMessages < ActiveRecord::Migration[4.2] def self.up add_index :messages, :last_reply_id add_index :messages, :author_id diff --git a/db/migrate/20091017212938_add_missing_indexes_to_repositories.rb b/db/migrate/20091017212938_add_missing_indexes_to_repositories.rb index b9f43b6df..c9ac3f120 100644 --- a/db/migrate/20091017212938_add_missing_indexes_to_repositories.rb +++ b/db/migrate/20091017212938_add_missing_indexes_to_repositories.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToRepositories < ActiveRecord::Migration +class AddMissingIndexesToRepositories < ActiveRecord::Migration[4.2] def self.up add_index :repositories, :project_id end diff --git a/db/migrate/20091017213027_add_missing_indexes_to_comments.rb b/db/migrate/20091017213027_add_missing_indexes_to_comments.rb index 2a1ed27c0..4bb8c0010 100644 --- a/db/migrate/20091017213027_add_missing_indexes_to_comments.rb +++ b/db/migrate/20091017213027_add_missing_indexes_to_comments.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToComments < ActiveRecord::Migration +class AddMissingIndexesToComments < ActiveRecord::Migration[4.2] def self.up add_index :comments, [:commented_id, :commented_type] add_index :comments, :author_id diff --git a/db/migrate/20091017213113_add_missing_indexes_to_enumerations.rb b/db/migrate/20091017213113_add_missing_indexes_to_enumerations.rb index 85dedf816..e97b993da 100644 --- a/db/migrate/20091017213113_add_missing_indexes_to_enumerations.rb +++ b/db/migrate/20091017213113_add_missing_indexes_to_enumerations.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToEnumerations < ActiveRecord::Migration +class AddMissingIndexesToEnumerations < ActiveRecord::Migration[4.2] def self.up add_index :enumerations, [:id, :type] end diff --git a/db/migrate/20091017213151_add_missing_indexes_to_wiki_pages.rb b/db/migrate/20091017213151_add_missing_indexes_to_wiki_pages.rb index 7fab09e38..edeca8da7 100644 --- a/db/migrate/20091017213151_add_missing_indexes_to_wiki_pages.rb +++ b/db/migrate/20091017213151_add_missing_indexes_to_wiki_pages.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToWikiPages < ActiveRecord::Migration +class AddMissingIndexesToWikiPages < ActiveRecord::Migration[4.2] def self.up add_index :wiki_pages, :wiki_id add_index :wiki_pages, :parent_id diff --git a/db/migrate/20091017213228_add_missing_indexes_to_watchers.rb b/db/migrate/20091017213228_add_missing_indexes_to_watchers.rb index 618e1cd94..18e948ec6 100644 --- a/db/migrate/20091017213228_add_missing_indexes_to_watchers.rb +++ b/db/migrate/20091017213228_add_missing_indexes_to_watchers.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToWatchers < ActiveRecord::Migration +class AddMissingIndexesToWatchers < ActiveRecord::Migration[4.2] def self.up add_index :watchers, :user_id add_index :watchers, [:watchable_id, :watchable_type] diff --git a/db/migrate/20091017213257_add_missing_indexes_to_auth_sources.rb b/db/migrate/20091017213257_add_missing_indexes_to_auth_sources.rb index ccd4f0440..eca45226d 100644 --- a/db/migrate/20091017213257_add_missing_indexes_to_auth_sources.rb +++ b/db/migrate/20091017213257_add_missing_indexes_to_auth_sources.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToAuthSources < ActiveRecord::Migration +class AddMissingIndexesToAuthSources < ActiveRecord::Migration[4.2] def self.up add_index :auth_sources, [:id, :type] end diff --git a/db/migrate/20091017213332_add_missing_indexes_to_documents.rb b/db/migrate/20091017213332_add_missing_indexes_to_documents.rb index f5190181e..a4e7e95dc 100644 --- a/db/migrate/20091017213332_add_missing_indexes_to_documents.rb +++ b/db/migrate/20091017213332_add_missing_indexes_to_documents.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToDocuments < ActiveRecord::Migration +class AddMissingIndexesToDocuments < ActiveRecord::Migration[4.2] def self.up add_index :documents, :category_id end diff --git a/db/migrate/20091017213444_add_missing_indexes_to_tokens.rb b/db/migrate/20091017213444_add_missing_indexes_to_tokens.rb index f0979f21c..27ce82a93 100644 --- a/db/migrate/20091017213444_add_missing_indexes_to_tokens.rb +++ b/db/migrate/20091017213444_add_missing_indexes_to_tokens.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToTokens < ActiveRecord::Migration +class AddMissingIndexesToTokens < ActiveRecord::Migration[4.2] def self.up add_index :tokens, :user_id end diff --git a/db/migrate/20091017213536_add_missing_indexes_to_changesets.rb b/db/migrate/20091017213536_add_missing_indexes_to_changesets.rb index 303be838d..a71910841 100644 --- a/db/migrate/20091017213536_add_missing_indexes_to_changesets.rb +++ b/db/migrate/20091017213536_add_missing_indexes_to_changesets.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToChangesets < ActiveRecord::Migration +class AddMissingIndexesToChangesets < ActiveRecord::Migration[4.2] def self.up add_index :changesets, :user_id add_index :changesets, :repository_id diff --git a/db/migrate/20091017213642_add_missing_indexes_to_issue_categories.rb b/db/migrate/20091017213642_add_missing_indexes_to_issue_categories.rb index 3f5b2b185..0a6282aa7 100644 --- a/db/migrate/20091017213642_add_missing_indexes_to_issue_categories.rb +++ b/db/migrate/20091017213642_add_missing_indexes_to_issue_categories.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToIssueCategories < ActiveRecord::Migration +class AddMissingIndexesToIssueCategories < ActiveRecord::Migration[4.2] def self.up add_index :issue_categories, :assigned_to_id end diff --git a/db/migrate/20091017213716_add_missing_indexes_to_member_roles.rb b/db/migrate/20091017213716_add_missing_indexes_to_member_roles.rb index e9ff62db9..fed50d62e 100644 --- a/db/migrate/20091017213716_add_missing_indexes_to_member_roles.rb +++ b/db/migrate/20091017213716_add_missing_indexes_to_member_roles.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToMemberRoles < ActiveRecord::Migration +class AddMissingIndexesToMemberRoles < ActiveRecord::Migration[4.2] def self.up add_index :member_roles, :member_id add_index :member_roles, :role_id diff --git a/db/migrate/20091017213757_add_missing_indexes_to_boards.rb b/db/migrate/20091017213757_add_missing_indexes_to_boards.rb index d3e94226a..5e5a97af5 100644 --- a/db/migrate/20091017213757_add_missing_indexes_to_boards.rb +++ b/db/migrate/20091017213757_add_missing_indexes_to_boards.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToBoards < ActiveRecord::Migration +class AddMissingIndexesToBoards < ActiveRecord::Migration[4.2] def self.up add_index :boards, :last_message_id end diff --git a/db/migrate/20091017213835_add_missing_indexes_to_user_preferences.rb b/db/migrate/20091017213835_add_missing_indexes_to_user_preferences.rb index f3a8ccbcb..83a259e59 100644 --- a/db/migrate/20091017213835_add_missing_indexes_to_user_preferences.rb +++ b/db/migrate/20091017213835_add_missing_indexes_to_user_preferences.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToUserPreferences < ActiveRecord::Migration +class AddMissingIndexesToUserPreferences < ActiveRecord::Migration[4.2] def self.up add_index :user_preferences, :user_id end diff --git a/db/migrate/20091017213910_add_missing_indexes_to_issues.rb b/db/migrate/20091017213910_add_missing_indexes_to_issues.rb index d651a5463..a337ebca8 100644 --- a/db/migrate/20091017213910_add_missing_indexes_to_issues.rb +++ b/db/migrate/20091017213910_add_missing_indexes_to_issues.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToIssues < ActiveRecord::Migration +class AddMissingIndexesToIssues < ActiveRecord::Migration[4.2] def self.up add_index :issues, :status_id add_index :issues, :category_id diff --git a/db/migrate/20091017214015_add_missing_indexes_to_members.rb b/db/migrate/20091017214015_add_missing_indexes_to_members.rb index 5fdf560fa..693258080 100644 --- a/db/migrate/20091017214015_add_missing_indexes_to_members.rb +++ b/db/migrate/20091017214015_add_missing_indexes_to_members.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToMembers < ActiveRecord::Migration +class AddMissingIndexesToMembers < ActiveRecord::Migration[4.2] def self.up add_index :members, :user_id add_index :members, :project_id diff --git a/db/migrate/20091017214107_add_missing_indexes_to_custom_fields.rb b/db/migrate/20091017214107_add_missing_indexes_to_custom_fields.rb index 18be0b44b..7dbb0e781 100644 --- a/db/migrate/20091017214107_add_missing_indexes_to_custom_fields.rb +++ b/db/migrate/20091017214107_add_missing_indexes_to_custom_fields.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToCustomFields < ActiveRecord::Migration +class AddMissingIndexesToCustomFields < ActiveRecord::Migration[4.2] def self.up add_index :custom_fields, [:id, :type] end diff --git a/db/migrate/20091017214136_add_missing_indexes_to_queries.rb b/db/migrate/20091017214136_add_missing_indexes_to_queries.rb index 414b1ad6b..9a8d6ad96 100644 --- a/db/migrate/20091017214136_add_missing_indexes_to_queries.rb +++ b/db/migrate/20091017214136_add_missing_indexes_to_queries.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToQueries < ActiveRecord::Migration +class AddMissingIndexesToQueries < ActiveRecord::Migration[4.2] def self.up add_index :queries, :project_id add_index :queries, :user_id diff --git a/db/migrate/20091017214236_add_missing_indexes_to_time_entries.rb b/db/migrate/20091017214236_add_missing_indexes_to_time_entries.rb index cffc528ea..cbe4166d5 100644 --- a/db/migrate/20091017214236_add_missing_indexes_to_time_entries.rb +++ b/db/migrate/20091017214236_add_missing_indexes_to_time_entries.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToTimeEntries < ActiveRecord::Migration +class AddMissingIndexesToTimeEntries < ActiveRecord::Migration[4.2] def self.up add_index :time_entries, :activity_id add_index :time_entries, :user_id diff --git a/db/migrate/20091017214308_add_missing_indexes_to_news.rb b/db/migrate/20091017214308_add_missing_indexes_to_news.rb index 808eb6294..e6194f4e6 100644 --- a/db/migrate/20091017214308_add_missing_indexes_to_news.rb +++ b/db/migrate/20091017214308_add_missing_indexes_to_news.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToNews < ActiveRecord::Migration +class AddMissingIndexesToNews < ActiveRecord::Migration[4.2] def self.up add_index :news, :author_id end diff --git a/db/migrate/20091017214336_add_missing_indexes_to_users.rb b/db/migrate/20091017214336_add_missing_indexes_to_users.rb index c5a509587..7eedd10fa 100644 --- a/db/migrate/20091017214336_add_missing_indexes_to_users.rb +++ b/db/migrate/20091017214336_add_missing_indexes_to_users.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToUsers < ActiveRecord::Migration +class AddMissingIndexesToUsers < ActiveRecord::Migration[4.2] def self.up add_index :users, [:id, :type] add_index :users, :auth_source_id diff --git a/db/migrate/20091017214406_add_missing_indexes_to_attachments.rb b/db/migrate/20091017214406_add_missing_indexes_to_attachments.rb index d22fc98ed..7fee1ea2e 100644 --- a/db/migrate/20091017214406_add_missing_indexes_to_attachments.rb +++ b/db/migrate/20091017214406_add_missing_indexes_to_attachments.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToAttachments < ActiveRecord::Migration +class AddMissingIndexesToAttachments < ActiveRecord::Migration[4.2] def self.up add_index :attachments, [:container_id, :container_type] add_index :attachments, :author_id diff --git a/db/migrate/20091017214440_add_missing_indexes_to_wiki_contents.rb b/db/migrate/20091017214440_add_missing_indexes_to_wiki_contents.rb index 454e4c5d0..47888d4ad 100644 --- a/db/migrate/20091017214440_add_missing_indexes_to_wiki_contents.rb +++ b/db/migrate/20091017214440_add_missing_indexes_to_wiki_contents.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToWikiContents < ActiveRecord::Migration +class AddMissingIndexesToWikiContents < ActiveRecord::Migration[4.2] def self.up add_index :wiki_contents, :author_id end diff --git a/db/migrate/20091017214519_add_missing_indexes_to_custom_values.rb b/db/migrate/20091017214519_add_missing_indexes_to_custom_values.rb index b192a7e2a..8b83c640d 100644 --- a/db/migrate/20091017214519_add_missing_indexes_to_custom_values.rb +++ b/db/migrate/20091017214519_add_missing_indexes_to_custom_values.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToCustomValues < ActiveRecord::Migration +class AddMissingIndexesToCustomValues < ActiveRecord::Migration[4.2] def self.up add_index :custom_values, :custom_field_id end diff --git a/db/migrate/20091017214611_add_missing_indexes_to_journals.rb b/db/migrate/20091017214611_add_missing_indexes_to_journals.rb index 2667f4034..26e37bf03 100644 --- a/db/migrate/20091017214611_add_missing_indexes_to_journals.rb +++ b/db/migrate/20091017214611_add_missing_indexes_to_journals.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToJournals < ActiveRecord::Migration +class AddMissingIndexesToJournals < ActiveRecord::Migration[4.2] def self.up add_index :journals, :user_id add_index :journals, :journalized_id diff --git a/db/migrate/20091017214644_add_missing_indexes_to_issue_relations.rb b/db/migrate/20091017214644_add_missing_indexes_to_issue_relations.rb index fc57f18bf..29de45f62 100644 --- a/db/migrate/20091017214644_add_missing_indexes_to_issue_relations.rb +++ b/db/migrate/20091017214644_add_missing_indexes_to_issue_relations.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToIssueRelations < ActiveRecord::Migration +class AddMissingIndexesToIssueRelations < ActiveRecord::Migration[4.2] def self.up add_index :issue_relations, :issue_from_id add_index :issue_relations, :issue_to_id diff --git a/db/migrate/20091017214720_add_missing_indexes_to_wiki_redirects.rb b/db/migrate/20091017214720_add_missing_indexes_to_wiki_redirects.rb index 7442a544f..a0ce07f8b 100644 --- a/db/migrate/20091017214720_add_missing_indexes_to_wiki_redirects.rb +++ b/db/migrate/20091017214720_add_missing_indexes_to_wiki_redirects.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToWikiRedirects < ActiveRecord::Migration +class AddMissingIndexesToWikiRedirects < ActiveRecord::Migration[4.2] def self.up add_index :wiki_redirects, :wiki_id end diff --git a/db/migrate/20091017214750_add_missing_indexes_to_custom_fields_trackers.rb b/db/migrate/20091017214750_add_missing_indexes_to_custom_fields_trackers.rb index c398b7931..23b6e5e4f 100644 --- a/db/migrate/20091017214750_add_missing_indexes_to_custom_fields_trackers.rb +++ b/db/migrate/20091017214750_add_missing_indexes_to_custom_fields_trackers.rb @@ -1,4 +1,4 @@ -class AddMissingIndexesToCustomFieldsTrackers < ActiveRecord::Migration +class AddMissingIndexesToCustomFieldsTrackers < ActiveRecord::Migration[4.2] def self.up add_index :custom_fields_trackers, [:custom_field_id, :tracker_id] end diff --git a/db/migrate/20091025163651_add_activity_indexes.rb b/db/migrate/20091025163651_add_activity_indexes.rb index f18059316..0bbf91bfd 100644 --- a/db/migrate/20091025163651_add_activity_indexes.rb +++ b/db/migrate/20091025163651_add_activity_indexes.rb @@ -1,4 +1,4 @@ -class AddActivityIndexes < ActiveRecord::Migration +class AddActivityIndexes < ActiveRecord::Migration[4.2] def self.up add_index :journals, :created_on add_index :changesets, :committed_on diff --git a/db/migrate/20091108092559_add_versions_status.rb b/db/migrate/20091108092559_add_versions_status.rb index 99f5f5a0e..36db4d823 100644 --- a/db/migrate/20091108092559_add_versions_status.rb +++ b/db/migrate/20091108092559_add_versions_status.rb @@ -1,4 +1,4 @@ -class AddVersionsStatus < ActiveRecord::Migration +class AddVersionsStatus < ActiveRecord::Migration[4.2] def self.up add_column :versions, :status, :string, :default => 'open' Version.update_all("status = 'open'") diff --git a/db/migrate/20091114105931_add_view_issues_permission.rb b/db/migrate/20091114105931_add_view_issues_permission.rb index 6f700cd0c..a0a9bcbf4 100644 --- a/db/migrate/20091114105931_add_view_issues_permission.rb +++ b/db/migrate/20091114105931_add_view_issues_permission.rb @@ -1,4 +1,4 @@ -class AddViewIssuesPermission < ActiveRecord::Migration +class AddViewIssuesPermission < ActiveRecord::Migration[4.2] def self.up Role.reset_column_information Role.all.each do |r| diff --git a/db/migrate/20091123212029_add_default_done_ratio_to_issue_status.rb b/db/migrate/20091123212029_add_default_done_ratio_to_issue_status.rb index 0ce672100..2b9df4f17 100644 --- a/db/migrate/20091123212029_add_default_done_ratio_to_issue_status.rb +++ b/db/migrate/20091123212029_add_default_done_ratio_to_issue_status.rb @@ -1,4 +1,4 @@ -class AddDefaultDoneRatioToIssueStatus < ActiveRecord::Migration +class AddDefaultDoneRatioToIssueStatus < ActiveRecord::Migration[4.2] def self.up add_column :issue_statuses, :default_done_ratio, :integer end diff --git a/db/migrate/20091205124427_add_versions_sharing.rb b/db/migrate/20091205124427_add_versions_sharing.rb index 3c28e1158..815f9fcda 100644 --- a/db/migrate/20091205124427_add_versions_sharing.rb +++ b/db/migrate/20091205124427_add_versions_sharing.rb @@ -1,4 +1,4 @@ -class AddVersionsSharing < ActiveRecord::Migration +class AddVersionsSharing < ActiveRecord::Migration[4.2] def self.up add_column :versions, :sharing, :string, :default => 'none', :null => false add_index :versions, :sharing diff --git a/db/migrate/20091220183509_add_lft_and_rgt_indexes_to_projects.rb b/db/migrate/20091220183509_add_lft_and_rgt_indexes_to_projects.rb index 1c0b4b313..8ec510851 100644 --- a/db/migrate/20091220183509_add_lft_and_rgt_indexes_to_projects.rb +++ b/db/migrate/20091220183509_add_lft_and_rgt_indexes_to_projects.rb @@ -1,4 +1,4 @@ -class AddLftAndRgtIndexesToProjects < ActiveRecord::Migration +class AddLftAndRgtIndexesToProjects < ActiveRecord::Migration[4.2] def self.up add_index :projects, :lft add_index :projects, :rgt diff --git a/db/migrate/20091220183727_add_index_to_settings_name.rb b/db/migrate/20091220183727_add_index_to_settings_name.rb index e6c96ec3f..51a33b179 100644 --- a/db/migrate/20091220183727_add_index_to_settings_name.rb +++ b/db/migrate/20091220183727_add_index_to_settings_name.rb @@ -1,4 +1,4 @@ -class AddIndexToSettingsName < ActiveRecord::Migration +class AddIndexToSettingsName < ActiveRecord::Migration[4.2] def self.up add_index :settings, :name end diff --git a/db/migrate/20091220184736_add_indexes_to_issue_status.rb b/db/migrate/20091220184736_add_indexes_to_issue_status.rb index 2497a1e6a..9b943518b 100644 --- a/db/migrate/20091220184736_add_indexes_to_issue_status.rb +++ b/db/migrate/20091220184736_add_indexes_to_issue_status.rb @@ -1,4 +1,4 @@ -class AddIndexesToIssueStatus < ActiveRecord::Migration +class AddIndexesToIssueStatus < ActiveRecord::Migration[4.2] def self.up add_index :issue_statuses, :position add_index :issue_statuses, :is_closed diff --git a/db/migrate/20091225164732_remove_enumerations_opt.rb b/db/migrate/20091225164732_remove_enumerations_opt.rb index 2a445dd3a..ee39d5b50 100644 --- a/db/migrate/20091225164732_remove_enumerations_opt.rb +++ b/db/migrate/20091225164732_remove_enumerations_opt.rb @@ -1,4 +1,4 @@ -class RemoveEnumerationsOpt < ActiveRecord::Migration +class RemoveEnumerationsOpt < ActiveRecord::Migration[4.2] def self.up remove_column :enumerations, :opt end diff --git a/db/migrate/20091227112908_change_wiki_contents_text_limit.rb b/db/migrate/20091227112908_change_wiki_contents_text_limit.rb index 225f71e68..d60a9a846 100644 --- a/db/migrate/20091227112908_change_wiki_contents_text_limit.rb +++ b/db/migrate/20091227112908_change_wiki_contents_text_limit.rb @@ -1,4 +1,4 @@ -class ChangeWikiContentsTextLimit < ActiveRecord::Migration +class ChangeWikiContentsTextLimit < ActiveRecord::Migration[4.2] def self.up # Migrates MySQL databases only # Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818) diff --git a/db/migrate/20100129193402_change_users_mail_notification_to_string.rb b/db/migrate/20100129193402_change_users_mail_notification_to_string.rb index 518a450f4..a31666e39 100644 --- a/db/migrate/20100129193402_change_users_mail_notification_to_string.rb +++ b/db/migrate/20100129193402_change_users_mail_notification_to_string.rb @@ -1,4 +1,4 @@ -class ChangeUsersMailNotificationToString < ActiveRecord::Migration +class ChangeUsersMailNotificationToString < ActiveRecord::Migration[4.2] def self.up rename_column :users, :mail_notification, :mail_notification_bool add_column :users, :mail_notification, :string, :default => '', :null => false diff --git a/db/migrate/20100129193813_update_mail_notification_values.rb b/db/migrate/20100129193813_update_mail_notification_values.rb index a8a45ade3..00d3a0478 100644 --- a/db/migrate/20100129193813_update_mail_notification_values.rb +++ b/db/migrate/20100129193813_update_mail_notification_values.rb @@ -1,5 +1,5 @@ # Patch the data from a boolean change. -class UpdateMailNotificationValues < ActiveRecord::Migration +class UpdateMailNotificationValues < ActiveRecord::Migration[4.2] def self.up # No-op # See 20100129193402_change_users_mail_notification_to_string.rb diff --git a/db/migrate/20100221100219_add_index_on_changesets_scmid.rb b/db/migrate/20100221100219_add_index_on_changesets_scmid.rb index 96d85a3a7..cef4be583 100644 --- a/db/migrate/20100221100219_add_index_on_changesets_scmid.rb +++ b/db/migrate/20100221100219_add_index_on_changesets_scmid.rb @@ -1,4 +1,4 @@ -class AddIndexOnChangesetsScmid < ActiveRecord::Migration +class AddIndexOnChangesetsScmid < ActiveRecord::Migration[4.2] def self.up add_index :changesets, [:repository_id, :scmid], :name => :changesets_repos_scmid end diff --git a/db/migrate/20100313132032_add_issues_nested_sets_columns.rb b/db/migrate/20100313132032_add_issues_nested_sets_columns.rb index 2467f6f67..a7e5ceeb1 100644 --- a/db/migrate/20100313132032_add_issues_nested_sets_columns.rb +++ b/db/migrate/20100313132032_add_issues_nested_sets_columns.rb @@ -1,4 +1,4 @@ -class AddIssuesNestedSetsColumns < ActiveRecord::Migration +class AddIssuesNestedSetsColumns < ActiveRecord::Migration[4.2] def self.up add_column :issues, :parent_id, :integer, :default => nil add_column :issues, :root_id, :integer, :default => nil diff --git a/db/migrate/20100313171051_add_index_on_issues_nested_set.rb b/db/migrate/20100313171051_add_index_on_issues_nested_set.rb index 4dc948000..b624c2249 100644 --- a/db/migrate/20100313171051_add_index_on_issues_nested_set.rb +++ b/db/migrate/20100313171051_add_index_on_issues_nested_set.rb @@ -1,4 +1,4 @@ -class AddIndexOnIssuesNestedSet < ActiveRecord::Migration +class AddIndexOnIssuesNestedSet < ActiveRecord::Migration[4.2] def self.up add_index :issues, [:root_id, :lft, :rgt] end diff --git a/db/migrate/20100705164950_change_changes_path_length_limit.rb b/db/migrate/20100705164950_change_changes_path_length_limit.rb index e00b69d08..f40ca0852 100644 --- a/db/migrate/20100705164950_change_changes_path_length_limit.rb +++ b/db/migrate/20100705164950_change_changes_path_length_limit.rb @@ -1,4 +1,4 @@ -class ChangeChangesPathLengthLimit < ActiveRecord::Migration +class ChangeChangesPathLengthLimit < ActiveRecord::Migration[4.2] def self.up # these are two steps to please MySQL 5 on Win32 change_column :changes, :path, :text, :default => nil, :null => true diff --git a/db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb b/db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb index 6071adf52..2e178e549 100644 --- a/db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb +++ b/db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb @@ -1,4 +1,4 @@ -class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration +class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration[4.2] def self.up EnabledModule.where(:name => 'issue_tracking').each do |e| EnabledModule.create(:name => 'calendar', :project_id => e.project_id) diff --git a/db/migrate/20101104182107_add_unique_index_on_members.rb b/db/migrate/20101104182107_add_unique_index_on_members.rb index eabdad86b..a29fc75b8 100644 --- a/db/migrate/20101104182107_add_unique_index_on_members.rb +++ b/db/migrate/20101104182107_add_unique_index_on_members.rb @@ -1,4 +1,4 @@ -class AddUniqueIndexOnMembers < ActiveRecord::Migration +class AddUniqueIndexOnMembers < ActiveRecord::Migration[4.2] def self.up # Clean and reassign MemberRole rows if needed MemberRole.where("member_id NOT IN (SELECT id FROM #{Member.table_name})").delete_all diff --git a/db/migrate/20101107130441_add_custom_fields_visible.rb b/db/migrate/20101107130441_add_custom_fields_visible.rb index 9d59faee5..d3edb145f 100644 --- a/db/migrate/20101107130441_add_custom_fields_visible.rb +++ b/db/migrate/20101107130441_add_custom_fields_visible.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsVisible < ActiveRecord::Migration +class AddCustomFieldsVisible < ActiveRecord::Migration[4.2] def self.up add_column :custom_fields, :visible, :boolean, :null => false, :default => true CustomField.update_all("visible = #{CustomField.connection.quoted_true}") diff --git a/db/migrate/20101114115114_change_projects_name_limit.rb b/db/migrate/20101114115114_change_projects_name_limit.rb index fabc3c9d8..e731a005d 100644 --- a/db/migrate/20101114115114_change_projects_name_limit.rb +++ b/db/migrate/20101114115114_change_projects_name_limit.rb @@ -1,4 +1,4 @@ -class ChangeProjectsNameLimit < ActiveRecord::Migration +class ChangeProjectsNameLimit < ActiveRecord::Migration[4.2] def self.up change_column :projects, :name, :string, :limit => nil, :default => '', :null => false end diff --git a/db/migrate/20101114115359_change_projects_identifier_limit.rb b/db/migrate/20101114115359_change_projects_identifier_limit.rb index 79426fadf..1e2bb6e1c 100644 --- a/db/migrate/20101114115359_change_projects_identifier_limit.rb +++ b/db/migrate/20101114115359_change_projects_identifier_limit.rb @@ -1,4 +1,4 @@ -class ChangeProjectsIdentifierLimit < ActiveRecord::Migration +class ChangeProjectsIdentifierLimit < ActiveRecord::Migration[4.2] def self.up change_column :projects, :identifier, :string, :limit => nil end diff --git a/db/migrate/20110220160626_add_workflows_assignee_and_author.rb b/db/migrate/20110220160626_add_workflows_assignee_and_author.rb index 448ac6302..5b04bd950 100644 --- a/db/migrate/20110220160626_add_workflows_assignee_and_author.rb +++ b/db/migrate/20110220160626_add_workflows_assignee_and_author.rb @@ -1,4 +1,4 @@ -class AddWorkflowsAssigneeAndAuthor < ActiveRecord::Migration +class AddWorkflowsAssigneeAndAuthor < ActiveRecord::Migration[4.2] def self.up add_column :workflows, :assignee, :boolean, :null => false, :default => false add_column :workflows, :author, :boolean, :null => false, :default => false diff --git a/db/migrate/20110223180944_add_users_salt.rb b/db/migrate/20110223180944_add_users_salt.rb index f1cf6483f..5fda33479 100644 --- a/db/migrate/20110223180944_add_users_salt.rb +++ b/db/migrate/20110223180944_add_users_salt.rb @@ -1,4 +1,4 @@ -class AddUsersSalt < ActiveRecord::Migration +class AddUsersSalt < ActiveRecord::Migration[4.2] def self.up add_column :users, :salt, :string, :limit => 64 end diff --git a/db/migrate/20110223180953_salt_user_passwords.rb b/db/migrate/20110223180953_salt_user_passwords.rb index 9f017db9c..007691b90 100644 --- a/db/migrate/20110223180953_salt_user_passwords.rb +++ b/db/migrate/20110223180953_salt_user_passwords.rb @@ -1,4 +1,4 @@ -class SaltUserPasswords < ActiveRecord::Migration +class SaltUserPasswords < ActiveRecord::Migration[4.2] def self.up say_with_time "Salting user passwords, this may take some time..." do diff --git a/db/migrate/20110224000000_add_repositories_path_encoding.rb b/db/migrate/20110224000000_add_repositories_path_encoding.rb index 253d7a66e..23c16d26d 100644 --- a/db/migrate/20110224000000_add_repositories_path_encoding.rb +++ b/db/migrate/20110224000000_add_repositories_path_encoding.rb @@ -1,4 +1,4 @@ -class AddRepositoriesPathEncoding < ActiveRecord::Migration +class AddRepositoriesPathEncoding < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :path_encoding, :string, :limit => 64, :default => nil end diff --git a/db/migrate/20110226120112_change_repositories_password_limit.rb b/db/migrate/20110226120112_change_repositories_password_limit.rb index 1ad937c7d..5eb41f588 100644 --- a/db/migrate/20110226120112_change_repositories_password_limit.rb +++ b/db/migrate/20110226120112_change_repositories_password_limit.rb @@ -1,4 +1,4 @@ -class ChangeRepositoriesPasswordLimit < ActiveRecord::Migration +class ChangeRepositoriesPasswordLimit < ActiveRecord::Migration[4.2] def self.up change_column :repositories, :password, :string, :limit => nil, :default => '' end diff --git a/db/migrate/20110226120132_change_auth_sources_account_password_limit.rb b/db/migrate/20110226120132_change_auth_sources_account_password_limit.rb index b1cd80aa5..fac820b17 100644 --- a/db/migrate/20110226120132_change_auth_sources_account_password_limit.rb +++ b/db/migrate/20110226120132_change_auth_sources_account_password_limit.rb @@ -1,4 +1,4 @@ -class ChangeAuthSourcesAccountPasswordLimit < ActiveRecord::Migration +class ChangeAuthSourcesAccountPasswordLimit < ActiveRecord::Migration[4.2] def self.up change_column :auth_sources, :account_password, :string, :limit => nil, :default => '' end diff --git a/db/migrate/20110227125750_change_journal_details_values_to_text.rb b/db/migrate/20110227125750_change_journal_details_values_to_text.rb index 25886575c..36dd7b5d1 100644 --- a/db/migrate/20110227125750_change_journal_details_values_to_text.rb +++ b/db/migrate/20110227125750_change_journal_details_values_to_text.rb @@ -1,4 +1,4 @@ -class ChangeJournalDetailsValuesToText < ActiveRecord::Migration +class ChangeJournalDetailsValuesToText < ActiveRecord::Migration[4.2] def self.up change_column :journal_details, :old_value, :text change_column :journal_details, :value, :text diff --git a/db/migrate/20110228000000_add_repositories_log_encoding.rb b/db/migrate/20110228000000_add_repositories_log_encoding.rb index 85cadafce..7201f74bf 100644 --- a/db/migrate/20110228000000_add_repositories_log_encoding.rb +++ b/db/migrate/20110228000000_add_repositories_log_encoding.rb @@ -1,4 +1,4 @@ -class AddRepositoriesLogEncoding < ActiveRecord::Migration +class AddRepositoriesLogEncoding < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :log_encoding, :string, :limit => 64, :default => nil end diff --git a/db/migrate/20110228000100_copy_repositories_log_encoding.rb b/db/migrate/20110228000100_copy_repositories_log_encoding.rb index 48d387138..df9c3dca5 100644 --- a/db/migrate/20110228000100_copy_repositories_log_encoding.rb +++ b/db/migrate/20110228000100_copy_repositories_log_encoding.rb @@ -1,4 +1,4 @@ -class CopyRepositoriesLogEncoding < ActiveRecord::Migration +class CopyRepositoriesLogEncoding < ActiveRecord::Migration[4.2] def self.up encoding = Setting.commit_logs_encoding.to_s.strip encoding = encoding.blank? ? 'UTF-8' : encoding diff --git a/db/migrate/20110401192910_add_index_to_users_type.rb b/db/migrate/20110401192910_add_index_to_users_type.rb index b9f501120..63fc49652 100644 --- a/db/migrate/20110401192910_add_index_to_users_type.rb +++ b/db/migrate/20110401192910_add_index_to_users_type.rb @@ -1,4 +1,4 @@ -class AddIndexToUsersType < ActiveRecord::Migration +class AddIndexToUsersType < ActiveRecord::Migration[4.2] def self.up add_index :users, :type end diff --git a/db/migrate/20110408103312_add_roles_issues_visibility.rb b/db/migrate/20110408103312_add_roles_issues_visibility.rb index 1e6b29a64..4f07e25ed 100644 --- a/db/migrate/20110408103312_add_roles_issues_visibility.rb +++ b/db/migrate/20110408103312_add_roles_issues_visibility.rb @@ -1,4 +1,4 @@ -class AddRolesIssuesVisibility < ActiveRecord::Migration +class AddRolesIssuesVisibility < ActiveRecord::Migration[4.2] def self.up add_column :roles, :issues_visibility, :string, :limit => 30, :default => 'default', :null => false end diff --git a/db/migrate/20110412065600_add_issues_is_private.rb b/db/migrate/20110412065600_add_issues_is_private.rb index 2cc4e4b15..0066225b0 100644 --- a/db/migrate/20110412065600_add_issues_is_private.rb +++ b/db/migrate/20110412065600_add_issues_is_private.rb @@ -1,4 +1,4 @@ -class AddIssuesIsPrivate < ActiveRecord::Migration +class AddIssuesIsPrivate < ActiveRecord::Migration[4.2] def self.up add_column :issues, :is_private, :boolean, :default => false, :null => false end diff --git a/db/migrate/20110511000000_add_repositories_extra_info.rb b/db/migrate/20110511000000_add_repositories_extra_info.rb index a5280dc57..60ab175bf 100644 --- a/db/migrate/20110511000000_add_repositories_extra_info.rb +++ b/db/migrate/20110511000000_add_repositories_extra_info.rb @@ -1,4 +1,4 @@ -class AddRepositoriesExtraInfo < ActiveRecord::Migration +class AddRepositoriesExtraInfo < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :extra_info, :text end diff --git a/db/migrate/20110902000000_create_changeset_parents.rb b/db/migrate/20110902000000_create_changeset_parents.rb index e679d3f91..1f367e606 100644 --- a/db/migrate/20110902000000_create_changeset_parents.rb +++ b/db/migrate/20110902000000_create_changeset_parents.rb @@ -1,4 +1,4 @@ -class CreateChangesetParents < ActiveRecord::Migration +class CreateChangesetParents < ActiveRecord::Migration[4.2] def self.up create_table :changeset_parents, :id => false do |t| t.column :changeset_id, :integer, :null => false diff --git a/db/migrate/20111201201315_add_unique_index_to_issue_relations.rb b/db/migrate/20111201201315_add_unique_index_to_issue_relations.rb index 1bee49ab0..63e6af87b 100644 --- a/db/migrate/20111201201315_add_unique_index_to_issue_relations.rb +++ b/db/migrate/20111201201315_add_unique_index_to_issue_relations.rb @@ -1,4 +1,4 @@ -class AddUniqueIndexToIssueRelations < ActiveRecord::Migration +class AddUniqueIndexToIssueRelations < ActiveRecord::Migration[4.2] def self.up # Remove duplicates diff --git a/db/migrate/20120115143024_add_repositories_identifier.rb b/db/migrate/20120115143024_add_repositories_identifier.rb index b54ebd1d5..28af22120 100644 --- a/db/migrate/20120115143024_add_repositories_identifier.rb +++ b/db/migrate/20120115143024_add_repositories_identifier.rb @@ -1,4 +1,4 @@ -class AddRepositoriesIdentifier < ActiveRecord::Migration +class AddRepositoriesIdentifier < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :identifier, :string end diff --git a/db/migrate/20120115143100_add_repositories_is_default.rb b/db/migrate/20120115143100_add_repositories_is_default.rb index 87f018120..81c242b5e 100644 --- a/db/migrate/20120115143100_add_repositories_is_default.rb +++ b/db/migrate/20120115143100_add_repositories_is_default.rb @@ -1,4 +1,4 @@ -class AddRepositoriesIsDefault < ActiveRecord::Migration +class AddRepositoriesIsDefault < ActiveRecord::Migration[4.2] def self.up add_column :repositories, :is_default, :boolean, :default => false end diff --git a/db/migrate/20120115143126_set_default_repositories.rb b/db/migrate/20120115143126_set_default_repositories.rb index 38e06f0ad..e99b30725 100644 --- a/db/migrate/20120115143126_set_default_repositories.rb +++ b/db/migrate/20120115143126_set_default_repositories.rb @@ -1,4 +1,4 @@ -class SetDefaultRepositories < ActiveRecord::Migration +class SetDefaultRepositories < ActiveRecord::Migration[4.2] def self.up Repository.update_all(["is_default = ?", false]) # Sets the last repository as default in case multiple repositories exist for the same project diff --git a/db/migrate/20120127174243_add_custom_fields_multiple.rb b/db/migrate/20120127174243_add_custom_fields_multiple.rb index caee40bd4..608fa6259 100644 --- a/db/migrate/20120127174243_add_custom_fields_multiple.rb +++ b/db/migrate/20120127174243_add_custom_fields_multiple.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsMultiple < ActiveRecord::Migration +class AddCustomFieldsMultiple < ActiveRecord::Migration[4.2] def self.up add_column :custom_fields, :multiple, :boolean, :default => false end diff --git a/db/migrate/20120205111326_change_users_login_limit.rb b/db/migrate/20120205111326_change_users_login_limit.rb index 4508a5c40..6f3c08b1f 100644 --- a/db/migrate/20120205111326_change_users_login_limit.rb +++ b/db/migrate/20120205111326_change_users_login_limit.rb @@ -1,4 +1,4 @@ -class ChangeUsersLoginLimit < ActiveRecord::Migration +class ChangeUsersLoginLimit < ActiveRecord::Migration[4.2] def self.up change_column :users, :login, :string, :limit => nil, :default => '', :null => false end diff --git a/db/migrate/20120223110929_change_attachments_container_defaults.rb b/db/migrate/20120223110929_change_attachments_container_defaults.rb index be720aafa..3c48276a1 100644 --- a/db/migrate/20120223110929_change_attachments_container_defaults.rb +++ b/db/migrate/20120223110929_change_attachments_container_defaults.rb @@ -1,4 +1,4 @@ -class ChangeAttachmentsContainerDefaults < ActiveRecord::Migration +class ChangeAttachmentsContainerDefaults < ActiveRecord::Migration[4.2] def self.up # Need to drop the index otherwise the following error occurs in Rails 3.1.3: # diff --git a/db/migrate/20120301153455_add_auth_sources_filter.rb b/db/migrate/20120301153455_add_auth_sources_filter.rb index 617b3b77e..8538f4da2 100644 --- a/db/migrate/20120301153455_add_auth_sources_filter.rb +++ b/db/migrate/20120301153455_add_auth_sources_filter.rb @@ -1,4 +1,4 @@ -class AddAuthSourcesFilter < ActiveRecord::Migration +class AddAuthSourcesFilter < ActiveRecord::Migration[4.2] def self.up add_column :auth_sources, :filter, :string end diff --git a/db/migrate/20120422150750_change_repositories_to_full_sti.rb b/db/migrate/20120422150750_change_repositories_to_full_sti.rb index d0de7bac7..101ecbc12 100644 --- a/db/migrate/20120422150750_change_repositories_to_full_sti.rb +++ b/db/migrate/20120422150750_change_repositories_to_full_sti.rb @@ -1,4 +1,4 @@ -class ChangeRepositoriesToFullSti < ActiveRecord::Migration +class ChangeRepositoriesToFullSti < ActiveRecord::Migration[4.2] def up Repository.connection. select_rows("SELECT id, type FROM #{Repository.table_name}"). diff --git a/db/migrate/20120705074331_add_trackers_fields_bits.rb b/db/migrate/20120705074331_add_trackers_fields_bits.rb index 5d8458382..90e2ca1fe 100644 --- a/db/migrate/20120705074331_add_trackers_fields_bits.rb +++ b/db/migrate/20120705074331_add_trackers_fields_bits.rb @@ -1,4 +1,4 @@ -class AddTrackersFieldsBits < ActiveRecord::Migration +class AddTrackersFieldsBits < ActiveRecord::Migration[4.2] def self.up add_column :trackers, :fields_bits, :integer, :default => 0 end diff --git a/db/migrate/20120707064544_add_auth_sources_timeout.rb b/db/migrate/20120707064544_add_auth_sources_timeout.rb index 40f467810..4491bc35b 100644 --- a/db/migrate/20120707064544_add_auth_sources_timeout.rb +++ b/db/migrate/20120707064544_add_auth_sources_timeout.rb @@ -1,4 +1,4 @@ -class AddAuthSourcesTimeout < ActiveRecord::Migration +class AddAuthSourcesTimeout < ActiveRecord::Migration[4.2] def up add_column :auth_sources, :timeout, :integer end diff --git a/db/migrate/20120714122000_add_workflows_type.rb b/db/migrate/20120714122000_add_workflows_type.rb index f263f25df..6e2ffb6a4 100644 --- a/db/migrate/20120714122000_add_workflows_type.rb +++ b/db/migrate/20120714122000_add_workflows_type.rb @@ -1,4 +1,4 @@ -class AddWorkflowsType < ActiveRecord::Migration +class AddWorkflowsType < ActiveRecord::Migration[4.2] def up add_column :workflows, :type, :string, :limit => 30 end diff --git a/db/migrate/20120714122100_update_workflows_to_sti.rb b/db/migrate/20120714122100_update_workflows_to_sti.rb index 8ee5c6dc3..a5da4ba7a 100644 --- a/db/migrate/20120714122100_update_workflows_to_sti.rb +++ b/db/migrate/20120714122100_update_workflows_to_sti.rb @@ -1,4 +1,4 @@ -class UpdateWorkflowsToSti < ActiveRecord::Migration +class UpdateWorkflowsToSti < ActiveRecord::Migration[4.2] def up WorkflowRule.update_all "type = 'WorkflowTransition'" end diff --git a/db/migrate/20120714122200_add_workflows_rule_fields.rb b/db/migrate/20120714122200_add_workflows_rule_fields.rb index 6e9c7df70..aff919bf6 100644 --- a/db/migrate/20120714122200_add_workflows_rule_fields.rb +++ b/db/migrate/20120714122200_add_workflows_rule_fields.rb @@ -1,4 +1,4 @@ -class AddWorkflowsRuleFields < ActiveRecord::Migration +class AddWorkflowsRuleFields < ActiveRecord::Migration[4.2] def up add_column :workflows, :field_name, :string, :limit => 30 add_column :workflows, :rule, :string, :limit => 30 diff --git a/db/migrate/20120731164049_add_boards_parent_id.rb b/db/migrate/20120731164049_add_boards_parent_id.rb index c9ce47f78..f67468426 100644 --- a/db/migrate/20120731164049_add_boards_parent_id.rb +++ b/db/migrate/20120731164049_add_boards_parent_id.rb @@ -1,4 +1,4 @@ -class AddBoardsParentId < ActiveRecord::Migration +class AddBoardsParentId < ActiveRecord::Migration[4.2] def up add_column :boards, :parent_id, :integer end diff --git a/db/migrate/20120930112914_add_journals_private_notes.rb b/db/migrate/20120930112914_add_journals_private_notes.rb index 41eb0e9ef..265d2516c 100644 --- a/db/migrate/20120930112914_add_journals_private_notes.rb +++ b/db/migrate/20120930112914_add_journals_private_notes.rb @@ -1,4 +1,4 @@ -class AddJournalsPrivateNotes < ActiveRecord::Migration +class AddJournalsPrivateNotes < ActiveRecord::Migration[4.2] def up add_column :journals, :private_notes, :boolean, :default => false, :null => false end diff --git a/db/migrate/20121026002032_add_enumerations_position_name.rb b/db/migrate/20121026002032_add_enumerations_position_name.rb index 52cbe08eb..eb5423fee 100644 --- a/db/migrate/20121026002032_add_enumerations_position_name.rb +++ b/db/migrate/20121026002032_add_enumerations_position_name.rb @@ -1,4 +1,4 @@ -class AddEnumerationsPositionName < ActiveRecord::Migration +class AddEnumerationsPositionName < ActiveRecord::Migration[4.2] def up add_column :enumerations, :position_name, :string, :limit => 30 end diff --git a/db/migrate/20121026003537_populate_enumerations_position_name.rb b/db/migrate/20121026003537_populate_enumerations_position_name.rb index 31777b75f..d4f1807ca 100644 --- a/db/migrate/20121026003537_populate_enumerations_position_name.rb +++ b/db/migrate/20121026003537_populate_enumerations_position_name.rb @@ -1,4 +1,4 @@ -class PopulateEnumerationsPositionName < ActiveRecord::Migration +class PopulateEnumerationsPositionName < ActiveRecord::Migration[4.2] def up IssuePriority.compute_position_names end diff --git a/db/migrate/20121209123234_add_queries_type.rb b/db/migrate/20121209123234_add_queries_type.rb index 202d524e1..fdfaac410 100644 --- a/db/migrate/20121209123234_add_queries_type.rb +++ b/db/migrate/20121209123234_add_queries_type.rb @@ -1,4 +1,4 @@ -class AddQueriesType < ActiveRecord::Migration +class AddQueriesType < ActiveRecord::Migration[4.2] def up add_column :queries, :type, :string end diff --git a/db/migrate/20121209123358_update_queries_to_sti.rb b/db/migrate/20121209123358_update_queries_to_sti.rb index d8dea4070..088b8ca84 100644 --- a/db/migrate/20121209123358_update_queries_to_sti.rb +++ b/db/migrate/20121209123358_update_queries_to_sti.rb @@ -1,4 +1,4 @@ -class UpdateQueriesToSti < ActiveRecord::Migration +class UpdateQueriesToSti < ActiveRecord::Migration[4.2] def up ::Query.update_all :type => 'IssueQuery' end diff --git a/db/migrate/20121213084931_add_attachments_disk_directory.rb b/db/migrate/20121213084931_add_attachments_disk_directory.rb index d11fcad9b..dc3458028 100644 --- a/db/migrate/20121213084931_add_attachments_disk_directory.rb +++ b/db/migrate/20121213084931_add_attachments_disk_directory.rb @@ -1,4 +1,4 @@ -class AddAttachmentsDiskDirectory < ActiveRecord::Migration +class AddAttachmentsDiskDirectory < ActiveRecord::Migration[4.2] def up add_column :attachments, :disk_directory, :string end diff --git a/db/migrate/20130110122628_split_documents_permissions.rb b/db/migrate/20130110122628_split_documents_permissions.rb index 0e010aa5c..f52b8e4cd 100644 --- a/db/migrate/20130110122628_split_documents_permissions.rb +++ b/db/migrate/20130110122628_split_documents_permissions.rb @@ -1,4 +1,4 @@ -class SplitDocumentsPermissions < ActiveRecord::Migration +class SplitDocumentsPermissions < ActiveRecord::Migration[4.2] def up # :manage_documents permission split into 3 permissions: # :add_documents, :edit_documents and :delete_documents diff --git a/db/migrate/20130201184705_add_unique_index_on_tokens_value.rb b/db/migrate/20130201184705_add_unique_index_on_tokens_value.rb index fdec9f8ee..4413e4e3b 100644 --- a/db/migrate/20130201184705_add_unique_index_on_tokens_value.rb +++ b/db/migrate/20130201184705_add_unique_index_on_tokens_value.rb @@ -1,4 +1,4 @@ -class AddUniqueIndexOnTokensValue < ActiveRecord::Migration +class AddUniqueIndexOnTokensValue < ActiveRecord::Migration[4.2] def up say_with_time "Adding unique index on tokens, this may take some time..." do # Just in case diff --git a/db/migrate/20130202090625_add_projects_inherit_members.rb b/db/migrate/20130202090625_add_projects_inherit_members.rb index 9cf5bade3..629ad4565 100644 --- a/db/migrate/20130202090625_add_projects_inherit_members.rb +++ b/db/migrate/20130202090625_add_projects_inherit_members.rb @@ -1,4 +1,4 @@ -class AddProjectsInheritMembers < ActiveRecord::Migration +class AddProjectsInheritMembers < ActiveRecord::Migration[4.2] def up add_column :projects, :inherit_members, :boolean, :default => false, :null => false end diff --git a/db/migrate/20130207175206_add_unique_index_on_custom_fields_trackers.rb b/db/migrate/20130207175206_add_unique_index_on_custom_fields_trackers.rb index 9977dcd50..3353803ab 100644 --- a/db/migrate/20130207175206_add_unique_index_on_custom_fields_trackers.rb +++ b/db/migrate/20130207175206_add_unique_index_on_custom_fields_trackers.rb @@ -1,4 +1,4 @@ -class AddUniqueIndexOnCustomFieldsTrackers < ActiveRecord::Migration +class AddUniqueIndexOnCustomFieldsTrackers < ActiveRecord::Migration[4.2] def up table_name = "#{CustomField.table_name_prefix}custom_fields_trackers#{CustomField.table_name_suffix}" duplicates = CustomField.connection.select_rows("SELECT custom_field_id, tracker_id FROM #{table_name} GROUP BY custom_field_id, tracker_id HAVING COUNT(*) > 1") diff --git a/db/migrate/20130207181455_add_unique_index_on_custom_fields_projects.rb b/db/migrate/20130207181455_add_unique_index_on_custom_fields_projects.rb index 223818d4f..2198aed77 100644 --- a/db/migrate/20130207181455_add_unique_index_on_custom_fields_projects.rb +++ b/db/migrate/20130207181455_add_unique_index_on_custom_fields_projects.rb @@ -1,4 +1,4 @@ -class AddUniqueIndexOnCustomFieldsProjects < ActiveRecord::Migration +class AddUniqueIndexOnCustomFieldsProjects < ActiveRecord::Migration[4.2] def up table_name = "#{CustomField.table_name_prefix}custom_fields_projects#{CustomField.table_name_suffix}" duplicates = CustomField.connection.select_rows("SELECT custom_field_id, project_id FROM #{table_name} GROUP BY custom_field_id, project_id HAVING COUNT(*) > 1") diff --git a/db/migrate/20130215073721_change_users_lastname_length_to_255.rb b/db/migrate/20130215073721_change_users_lastname_length_to_255.rb index 7d68e37d8..02939aadb 100644 --- a/db/migrate/20130215073721_change_users_lastname_length_to_255.rb +++ b/db/migrate/20130215073721_change_users_lastname_length_to_255.rb @@ -1,4 +1,4 @@ -class ChangeUsersLastnameLengthTo255 < ActiveRecord::Migration +class ChangeUsersLastnameLengthTo255 < ActiveRecord::Migration[4.2] def self.up change_column :users, :lastname, :string, :limit => 255, :default => '', :null => false end diff --git a/db/migrate/20130215111127_add_issues_closed_on.rb b/db/migrate/20130215111127_add_issues_closed_on.rb index 2670deba5..f719b0d21 100644 --- a/db/migrate/20130215111127_add_issues_closed_on.rb +++ b/db/migrate/20130215111127_add_issues_closed_on.rb @@ -1,4 +1,4 @@ -class AddIssuesClosedOn < ActiveRecord::Migration +class AddIssuesClosedOn < ActiveRecord::Migration[4.2] def up add_column :issues, :closed_on, :datetime, :default => nil end diff --git a/db/migrate/20130215111141_populate_issues_closed_on.rb b/db/migrate/20130215111141_populate_issues_closed_on.rb index 19313d4c8..009573837 100644 --- a/db/migrate/20130215111141_populate_issues_closed_on.rb +++ b/db/migrate/20130215111141_populate_issues_closed_on.rb @@ -1,4 +1,4 @@ -class PopulateIssuesClosedOn < ActiveRecord::Migration +class PopulateIssuesClosedOn < ActiveRecord::Migration[4.2] def up closed_status_ids = IssueStatus.where(:is_closed => true).pluck(:id) if closed_status_ids.any? diff --git a/db/migrate/20130217094251_remove_issues_default_fk_values.rb b/db/migrate/20130217094251_remove_issues_default_fk_values.rb index 9345cf0b8..e2cea2160 100644 --- a/db/migrate/20130217094251_remove_issues_default_fk_values.rb +++ b/db/migrate/20130217094251_remove_issues_default_fk_values.rb @@ -1,4 +1,4 @@ -class RemoveIssuesDefaultFkValues < ActiveRecord::Migration +class RemoveIssuesDefaultFkValues < ActiveRecord::Migration[4.2] def up change_column_default :issues, :tracker_id, nil change_column_default :issues, :project_id, nil diff --git a/db/migrate/20130602092539_create_queries_roles.rb b/db/migrate/20130602092539_create_queries_roles.rb index 7713a7a36..f37c26bbf 100644 --- a/db/migrate/20130602092539_create_queries_roles.rb +++ b/db/migrate/20130602092539_create_queries_roles.rb @@ -1,4 +1,4 @@ -class CreateQueriesRoles < ActiveRecord::Migration +class CreateQueriesRoles < ActiveRecord::Migration[4.2] def self.up create_table :queries_roles, :id => false do |t| t.column :query_id, :integer, :null => false diff --git a/db/migrate/20130710182539_add_queries_visibility.rb b/db/migrate/20130710182539_add_queries_visibility.rb index d6cd1a7b3..36f298d11 100644 --- a/db/migrate/20130710182539_add_queries_visibility.rb +++ b/db/migrate/20130710182539_add_queries_visibility.rb @@ -1,4 +1,4 @@ -class AddQueriesVisibility < ActiveRecord::Migration +class AddQueriesVisibility < ActiveRecord::Migration[4.2] def up add_column :queries, :visibility, :integer, :default => 0 Query.where(:is_public => true).update_all(:visibility => 2) diff --git a/db/migrate/20130713104233_create_custom_fields_roles.rb b/db/migrate/20130713104233_create_custom_fields_roles.rb index e9eeccc17..c34a123c1 100644 --- a/db/migrate/20130713104233_create_custom_fields_roles.rb +++ b/db/migrate/20130713104233_create_custom_fields_roles.rb @@ -1,4 +1,4 @@ -class CreateCustomFieldsRoles < ActiveRecord::Migration +class CreateCustomFieldsRoles < ActiveRecord::Migration[4.2] def self.up create_table :custom_fields_roles, :id => false do |t| t.column :custom_field_id, :integer, :null => false diff --git a/db/migrate/20130713111657_add_queries_options.rb b/db/migrate/20130713111657_add_queries_options.rb index f203b11c4..9bd5834aa 100644 --- a/db/migrate/20130713111657_add_queries_options.rb +++ b/db/migrate/20130713111657_add_queries_options.rb @@ -1,4 +1,4 @@ -class AddQueriesOptions < ActiveRecord::Migration +class AddQueriesOptions < ActiveRecord::Migration[4.2] def up add_column :queries, :options, :text end diff --git a/db/migrate/20130729070143_add_users_must_change_passwd.rb b/db/migrate/20130729070143_add_users_must_change_passwd.rb index 13c29292e..3a5860fe0 100644 --- a/db/migrate/20130729070143_add_users_must_change_passwd.rb +++ b/db/migrate/20130729070143_add_users_must_change_passwd.rb @@ -1,4 +1,4 @@ -class AddUsersMustChangePasswd < ActiveRecord::Migration +class AddUsersMustChangePasswd < ActiveRecord::Migration[4.2] def up add_column :users, :must_change_passwd, :boolean, :default => false, :null => false end diff --git a/db/migrate/20130911193200_remove_eols_from_attachments_filename.rb b/db/migrate/20130911193200_remove_eols_from_attachments_filename.rb index d2f828170..3eafd3399 100644 --- a/db/migrate/20130911193200_remove_eols_from_attachments_filename.rb +++ b/db/migrate/20130911193200_remove_eols_from_attachments_filename.rb @@ -1,4 +1,4 @@ -class RemoveEolsFromAttachmentsFilename < ActiveRecord::Migration +class RemoveEolsFromAttachmentsFilename < ActiveRecord::Migration[4.2] def up Attachment.where("filename like ? or filename like ?", "%\r%", "%\n%").each do |attachment| filename = attachment.filename.to_s.tr("\r\n", "_") diff --git a/db/migrate/20131004113137_support_for_multiple_commit_keywords.rb b/db/migrate/20131004113137_support_for_multiple_commit_keywords.rb index 36104285b..d8beb4aea 100644 --- a/db/migrate/20131004113137_support_for_multiple_commit_keywords.rb +++ b/db/migrate/20131004113137_support_for_multiple_commit_keywords.rb @@ -1,4 +1,4 @@ -class SupportForMultipleCommitKeywords < ActiveRecord::Migration +class SupportForMultipleCommitKeywords < ActiveRecord::Migration[4.2] def up # Replaces commit_fix_keywords, commit_fix_status_id, commit_fix_done_ratio settings # with commit_update_keywords setting diff --git a/db/migrate/20131005100610_add_repositories_created_on.rb b/db/migrate/20131005100610_add_repositories_created_on.rb index 1f9822107..ccc664b5b 100644 --- a/db/migrate/20131005100610_add_repositories_created_on.rb +++ b/db/migrate/20131005100610_add_repositories_created_on.rb @@ -1,4 +1,4 @@ -class AddRepositoriesCreatedOn < ActiveRecord::Migration +class AddRepositoriesCreatedOn < ActiveRecord::Migration[4.2] def up add_column :repositories, :created_on, :timestamp end diff --git a/db/migrate/20131124175346_add_custom_fields_format_store.rb b/db/migrate/20131124175346_add_custom_fields_format_store.rb index 47c7b313a..fc9cb4d66 100644 --- a/db/migrate/20131124175346_add_custom_fields_format_store.rb +++ b/db/migrate/20131124175346_add_custom_fields_format_store.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsFormatStore < ActiveRecord::Migration +class AddCustomFieldsFormatStore < ActiveRecord::Migration[4.2] def up add_column :custom_fields, :format_store, :text end diff --git a/db/migrate/20131210180802_add_custom_fields_description.rb b/db/migrate/20131210180802_add_custom_fields_description.rb index 8a5d9809d..736b2cf17 100644 --- a/db/migrate/20131210180802_add_custom_fields_description.rb +++ b/db/migrate/20131210180802_add_custom_fields_description.rb @@ -1,4 +1,4 @@ -class AddCustomFieldsDescription < ActiveRecord::Migration +class AddCustomFieldsDescription < ActiveRecord::Migration[4.2] def up add_column :custom_fields, :description, :text end diff --git a/db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb b/db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb index d7111c12d..7a37d3c8d 100644 --- a/db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb +++ b/db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb @@ -1,4 +1,4 @@ -class RemoveCustomFieldsMinMaxLengthDefaultValues < ActiveRecord::Migration +class RemoveCustomFieldsMinMaxLengthDefaultValues < ActiveRecord::Migration[4.2] def up change_column :custom_fields, :min_length, :int, :default => nil, :null => true change_column :custom_fields, :max_length, :int, :default => nil, :null => true diff --git a/db/migrate/20131215104612_store_relation_type_in_journal_details.rb b/db/migrate/20131215104612_store_relation_type_in_journal_details.rb index 3fa6b1f11..c1990e67d 100644 --- a/db/migrate/20131215104612_store_relation_type_in_journal_details.rb +++ b/db/migrate/20131215104612_store_relation_type_in_journal_details.rb @@ -1,4 +1,4 @@ -class StoreRelationTypeInJournalDetails < ActiveRecord::Migration +class StoreRelationTypeInJournalDetails < ActiveRecord::Migration[4.2] MAPPING = { "label_relates_to" => "relates", diff --git a/db/migrate/20131218183023_delete_orphan_time_entries_custom_values.rb b/db/migrate/20131218183023_delete_orphan_time_entries_custom_values.rb index f4e593559..e9d902d2f 100644 --- a/db/migrate/20131218183023_delete_orphan_time_entries_custom_values.rb +++ b/db/migrate/20131218183023_delete_orphan_time_entries_custom_values.rb @@ -1,4 +1,4 @@ -class DeleteOrphanTimeEntriesCustomValues < ActiveRecord::Migration +class DeleteOrphanTimeEntriesCustomValues < ActiveRecord::Migration[4.2] def up CustomValue.where("customized_type = ? AND NOT EXISTS (SELECT 1 FROM #{TimeEntry.table_name} t WHERE t.id = customized_id)", "TimeEntry").delete_all end diff --git a/db/migrate/20140228130325_change_changesets_comments_limit.rb b/db/migrate/20140228130325_change_changesets_comments_limit.rb index dccc23757..2cff73120 100644 --- a/db/migrate/20140228130325_change_changesets_comments_limit.rb +++ b/db/migrate/20140228130325_change_changesets_comments_limit.rb @@ -1,4 +1,4 @@ -class ChangeChangesetsCommentsLimit < ActiveRecord::Migration +class ChangeChangesetsCommentsLimit < ActiveRecord::Migration[4.2] def up if ActiveRecord::Base.connection.adapter_name =~ /mysql/i max_size = 16.megabytes diff --git a/db/migrate/20140903143914_add_password_changed_at_to_user.rb b/db/migrate/20140903143914_add_password_changed_at_to_user.rb index 508b9d809..80ebd9e3e 100644 --- a/db/migrate/20140903143914_add_password_changed_at_to_user.rb +++ b/db/migrate/20140903143914_add_password_changed_at_to_user.rb @@ -1,5 +1,5 @@ -class AddPasswordChangedAtToUser < ActiveRecord::Migration - def change - add_column :users, :passwd_changed_on, :datetime - end -end +class AddPasswordChangedAtToUser < ActiveRecord::Migration[4.2]
+ def change
+ add_column :users, :passwd_changed_on, :datetime
+ end
+end
diff --git a/db/migrate/20140920094058_insert_builtin_groups.rb b/db/migrate/20140920094058_insert_builtin_groups.rb index ec505af2f..f58d77fba 100644 --- a/db/migrate/20140920094058_insert_builtin_groups.rb +++ b/db/migrate/20140920094058_insert_builtin_groups.rb @@ -1,4 +1,4 @@ -class InsertBuiltinGroups < ActiveRecord::Migration +class InsertBuiltinGroups < ActiveRecord::Migration[4.2] def up Group.reset_column_information diff --git a/db/migrate/20141029181752_add_trackers_default_status_id.rb b/db/migrate/20141029181752_add_trackers_default_status_id.rb index c0315df70..74716ea63 100644 --- a/db/migrate/20141029181752_add_trackers_default_status_id.rb +++ b/db/migrate/20141029181752_add_trackers_default_status_id.rb @@ -1,4 +1,4 @@ -class AddTrackersDefaultStatusId < ActiveRecord::Migration +class AddTrackersDefaultStatusId < ActiveRecord::Migration[4.2] def up add_column :trackers, :default_status_id, :integer diff --git a/db/migrate/20141029181824_remove_issue_statuses_is_default.rb b/db/migrate/20141029181824_remove_issue_statuses_is_default.rb index c5c813d62..09808e31c 100644 --- a/db/migrate/20141029181824_remove_issue_statuses_is_default.rb +++ b/db/migrate/20141029181824_remove_issue_statuses_is_default.rb @@ -1,4 +1,4 @@ -class RemoveIssueStatusesIsDefault < ActiveRecord::Migration +class RemoveIssueStatusesIsDefault < ActiveRecord::Migration[4.2] def up remove_column :issue_statuses, :is_default end diff --git a/db/migrate/20141109112308_add_roles_users_visibility.rb b/db/migrate/20141109112308_add_roles_users_visibility.rb index 05c4b6cff..ef9dabb2b 100644 --- a/db/migrate/20141109112308_add_roles_users_visibility.rb +++ b/db/migrate/20141109112308_add_roles_users_visibility.rb @@ -1,4 +1,4 @@ -class AddRolesUsersVisibility < ActiveRecord::Migration +class AddRolesUsersVisibility < ActiveRecord::Migration[4.2] def self.up add_column :roles, :users_visibility, :string, :limit => 30, :default => 'all', :null => false end diff --git a/db/migrate/20141122124142_add_wiki_redirects_redirects_to_wiki_id.rb b/db/migrate/20141122124142_add_wiki_redirects_redirects_to_wiki_id.rb index 6dfbd0e14..fee149968 100644 --- a/db/migrate/20141122124142_add_wiki_redirects_redirects_to_wiki_id.rb +++ b/db/migrate/20141122124142_add_wiki_redirects_redirects_to_wiki_id.rb @@ -1,4 +1,4 @@ -class AddWikiRedirectsRedirectsToWikiId < ActiveRecord::Migration +class AddWikiRedirectsRedirectsToWikiId < ActiveRecord::Migration[4.2] def self.up add_column :wiki_redirects, :redirects_to_wiki_id, :integer WikiRedirect.update_all "redirects_to_wiki_id = wiki_id" diff --git a/db/migrate/20150113194759_create_email_addresses.rb b/db/migrate/20150113194759_create_email_addresses.rb index a0babce62..22ad19e94 100644 --- a/db/migrate/20150113194759_create_email_addresses.rb +++ b/db/migrate/20150113194759_create_email_addresses.rb @@ -1,4 +1,4 @@ -class CreateEmailAddresses < ActiveRecord::Migration +class CreateEmailAddresses < ActiveRecord::Migration[4.2] def change create_table :email_addresses do |t| t.column :user_id, :integer, :null => false diff --git a/db/migrate/20150113211532_populate_email_addresses.rb b/db/migrate/20150113211532_populate_email_addresses.rb index 80a5fb016..7e4a5509d 100644 --- a/db/migrate/20150113211532_populate_email_addresses.rb +++ b/db/migrate/20150113211532_populate_email_addresses.rb @@ -1,4 +1,4 @@ -class PopulateEmailAddresses < ActiveRecord::Migration +class PopulateEmailAddresses < ActiveRecord::Migration[4.2] def self.up t = EmailAddress.connection.quoted_true n = EmailAddress.connection.quoted_date(Time.now) diff --git a/db/migrate/20150113213922_remove_users_mail.rb b/db/migrate/20150113213922_remove_users_mail.rb index 81bbcf1b7..2942c4136 100644 --- a/db/migrate/20150113213922_remove_users_mail.rb +++ b/db/migrate/20150113213922_remove_users_mail.rb @@ -1,4 +1,4 @@ -class RemoveUsersMail < ActiveRecord::Migration +class RemoveUsersMail < ActiveRecord::Migration[4.2] def self.up remove_column :users, :mail end diff --git a/db/migrate/20150113213955_add_email_addresses_user_id_index.rb b/db/migrate/20150113213955_add_email_addresses_user_id_index.rb index b7fb90c97..b57b362fa 100644 --- a/db/migrate/20150113213955_add_email_addresses_user_id_index.rb +++ b/db/migrate/20150113213955_add_email_addresses_user_id_index.rb @@ -1,4 +1,4 @@ -class AddEmailAddressesUserIdIndex < ActiveRecord::Migration +class AddEmailAddressesUserIdIndex < ActiveRecord::Migration[4.2] def up add_index :email_addresses, :user_id end diff --git a/db/migrate/20150208105930_replace_move_issues_permission.rb b/db/migrate/20150208105930_replace_move_issues_permission.rb index 18578f7da..690bba23c 100644 --- a/db/migrate/20150208105930_replace_move_issues_permission.rb +++ b/db/migrate/20150208105930_replace_move_issues_permission.rb @@ -1,4 +1,4 @@ -class ReplaceMoveIssuesPermission < ActiveRecord::Migration +class ReplaceMoveIssuesPermission < ActiveRecord::Migration[4.2] def self.up Role.all.each do |role| if role.has_permission?(:edit_issues) && !role.has_permission?(:move_issues) diff --git a/db/migrate/20150510083747_change_documents_title_limit.rb b/db/migrate/20150510083747_change_documents_title_limit.rb index 6e3090334..ebb2767c7 100644 --- a/db/migrate/20150510083747_change_documents_title_limit.rb +++ b/db/migrate/20150510083747_change_documents_title_limit.rb @@ -1,4 +1,4 @@ -class ChangeDocumentsTitleLimit < ActiveRecord::Migration +class ChangeDocumentsTitleLimit < ActiveRecord::Migration[4.2] def self.up change_column :documents, :title, :string, :limit => nil, :default => '', :null => false end diff --git a/db/migrate/20150525103953_clear_estimated_hours_on_parent_issues.rb b/db/migrate/20150525103953_clear_estimated_hours_on_parent_issues.rb index c00ada096..4dfc38d2f 100644 --- a/db/migrate/20150525103953_clear_estimated_hours_on_parent_issues.rb +++ b/db/migrate/20150525103953_clear_estimated_hours_on_parent_issues.rb @@ -1,4 +1,4 @@ -class ClearEstimatedHoursOnParentIssues < ActiveRecord::Migration +class ClearEstimatedHoursOnParentIssues < ActiveRecord::Migration[4.2] def self.up # Clears estimated hours on parent issues Issue.where("rgt > lft + 1 AND estimated_hours > 0").update_all :estimated_hours => nil diff --git a/db/migrate/20150526183158_add_roles_time_entries_visibility.rb b/db/migrate/20150526183158_add_roles_time_entries_visibility.rb index 991a14f02..968adc6eb 100644 --- a/db/migrate/20150526183158_add_roles_time_entries_visibility.rb +++ b/db/migrate/20150526183158_add_roles_time_entries_visibility.rb @@ -1,4 +1,4 @@ -class AddRolesTimeEntriesVisibility < ActiveRecord::Migration +class AddRolesTimeEntriesVisibility < ActiveRecord::Migration[4.2] def self.up add_column :roles, :time_entries_visibility, :string, :limit => 30, :default => 'all', :null => false end diff --git a/db/migrate/20150528084820_add_roles_all_roles_managed.rb b/db/migrate/20150528084820_add_roles_all_roles_managed.rb index c4e2b9b17..08c8ddce3 100644 --- a/db/migrate/20150528084820_add_roles_all_roles_managed.rb +++ b/db/migrate/20150528084820_add_roles_all_roles_managed.rb @@ -1,4 +1,4 @@ -class AddRolesAllRolesManaged < ActiveRecord::Migration +class AddRolesAllRolesManaged < ActiveRecord::Migration[4.2] def change add_column :roles, :all_roles_managed, :boolean, :default => true, :null => false end diff --git a/db/migrate/20150528092912_create_roles_managed_roles.rb b/db/migrate/20150528092912_create_roles_managed_roles.rb index 94e5ee2d8..707fca675 100644 --- a/db/migrate/20150528092912_create_roles_managed_roles.rb +++ b/db/migrate/20150528092912_create_roles_managed_roles.rb @@ -1,4 +1,4 @@ -class CreateRolesManagedRoles < ActiveRecord::Migration +class CreateRolesManagedRoles < ActiveRecord::Migration[4.2] def change create_table :roles_managed_roles, :id => false do |t| t.integer :role_id, :null => false diff --git a/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb b/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb index 74dc64b38..c20873629 100644 --- a/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb +++ b/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb @@ -1,4 +1,4 @@ -class AddUniqueIndexOnRolesManagedRoles < ActiveRecord::Migration +class AddUniqueIndexOnRolesManagedRoles < ActiveRecord::Migration[4.2] def change add_index :roles_managed_roles, [:role_id, :managed_role_id], :unique => true end diff --git a/db/migrate/20150725112753_insert_allowed_statuses_for_new_issues.rb b/db/migrate/20150725112753_insert_allowed_statuses_for_new_issues.rb index dec3bdda1..f86d54f47 100644 --- a/db/migrate/20150725112753_insert_allowed_statuses_for_new_issues.rb +++ b/db/migrate/20150725112753_insert_allowed_statuses_for_new_issues.rb @@ -1,4 +1,4 @@ -class InsertAllowedStatusesForNewIssues < ActiveRecord::Migration +class InsertAllowedStatusesForNewIssues < ActiveRecord::Migration[4.2] def self.up # Adds the default status for all trackers and roles sql = "INSERT INTO #{WorkflowTransition.table_name} (tracker_id, old_status_id, new_status_id, role_id, type)" + diff --git a/db/migrate/20150730122707_create_imports.rb b/db/migrate/20150730122707_create_imports.rb index b6bedfc96..0a4109edb 100644 --- a/db/migrate/20150730122707_create_imports.rb +++ b/db/migrate/20150730122707_create_imports.rb @@ -1,4 +1,4 @@ -class CreateImports < ActiveRecord::Migration +class CreateImports < ActiveRecord::Migration[4.2] def change create_table :imports do |t| t.string :type diff --git a/db/migrate/20150730122735_create_import_items.rb b/db/migrate/20150730122735_create_import_items.rb index 7e9cfb7d6..2639805dd 100644 --- a/db/migrate/20150730122735_create_import_items.rb +++ b/db/migrate/20150730122735_create_import_items.rb @@ -1,4 +1,4 @@ -class CreateImportItems < ActiveRecord::Migration +class CreateImportItems < ActiveRecord::Migration[4.2] def change create_table :import_items do |t| t.integer :import_id, :null => false diff --git a/db/migrate/20150921204850_change_time_entries_comments_limit_to_1024.rb b/db/migrate/20150921204850_change_time_entries_comments_limit_to_1024.rb index 8366e8f10..f529a99fc 100644 --- a/db/migrate/20150921204850_change_time_entries_comments_limit_to_1024.rb +++ b/db/migrate/20150921204850_change_time_entries_comments_limit_to_1024.rb @@ -1,4 +1,4 @@ -class ChangeTimeEntriesCommentsLimitTo1024 < ActiveRecord::Migration +class ChangeTimeEntriesCommentsLimitTo1024 < ActiveRecord::Migration[4.2] def self.up change_column :time_entries, :comments, :string, :limit => 1024 end diff --git a/db/migrate/20150921210243_change_wiki_contents_comments_limit_to_1024.rb b/db/migrate/20150921210243_change_wiki_contents_comments_limit_to_1024.rb index 5a35b03a1..9f85a7c61 100644 --- a/db/migrate/20150921210243_change_wiki_contents_comments_limit_to_1024.rb +++ b/db/migrate/20150921210243_change_wiki_contents_comments_limit_to_1024.rb @@ -1,4 +1,4 @@ -class ChangeWikiContentsCommentsLimitTo1024 < ActiveRecord::Migration +class ChangeWikiContentsCommentsLimitTo1024 < ActiveRecord::Migration[4.2] def self.up change_column :wiki_content_versions, :comments, :string, :limit => 1024, :default => '' change_column :wiki_contents, :comments, :string, :limit => 1024, :default => '' diff --git a/db/migrate/20151020182334_change_attachments_filesize_limit_to_8.rb b/db/migrate/20151020182334_change_attachments_filesize_limit_to_8.rb index a58e57183..508e3ad39 100644 --- a/db/migrate/20151020182334_change_attachments_filesize_limit_to_8.rb +++ b/db/migrate/20151020182334_change_attachments_filesize_limit_to_8.rb @@ -1,4 +1,4 @@ -class ChangeAttachmentsFilesizeLimitTo8 < ActiveRecord::Migration +class ChangeAttachmentsFilesizeLimitTo8 < ActiveRecord::Migration[4.2] def self.up change_column :attachments, :filesize, :integer, :limit => 8, :default => 0, :null => false end diff --git a/db/migrate/20151020182731_fix_comma_in_user_format_setting_value.rb b/db/migrate/20151020182731_fix_comma_in_user_format_setting_value.rb index 751ff21f2..9c185b0cd 100644 --- a/db/migrate/20151020182731_fix_comma_in_user_format_setting_value.rb +++ b/db/migrate/20151020182731_fix_comma_in_user_format_setting_value.rb @@ -1,4 +1,4 @@ -class FixCommaInUserFormatSettingValue < ActiveRecord::Migration +class FixCommaInUserFormatSettingValue < ActiveRecord::Migration[4.2] def self.up Setting. where(:name => 'user_format', :value => 'lastname_coma_firstname'). diff --git a/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb b/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb index b9c971edf..7d0fa8a17 100644 --- a/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb +++ b/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb @@ -1,4 +1,4 @@ -class ChangeIssueCategoriesNameLimitTo60 < ActiveRecord::Migration +class ChangeIssueCategoriesNameLimitTo60 < ActiveRecord::Migration[4.2] def self.up change_column :issue_categories, :name, :string, :limit => 60, :default => "", :null => false end diff --git a/db/migrate/20151021185456_change_auth_sources_filter_to_text.rb b/db/migrate/20151021185456_change_auth_sources_filter_to_text.rb index 344f9fa4a..71575631e 100644 --- a/db/migrate/20151021185456_change_auth_sources_filter_to_text.rb +++ b/db/migrate/20151021185456_change_auth_sources_filter_to_text.rb @@ -1,4 +1,4 @@ -class ChangeAuthSourcesFilterToText < ActiveRecord::Migration +class ChangeAuthSourcesFilterToText < ActiveRecord::Migration[4.2] def self.up change_column :auth_sources, :filter, :text end diff --git a/db/migrate/20151021190616_change_user_preferences_hide_mail_default_to_true.rb b/db/migrate/20151021190616_change_user_preferences_hide_mail_default_to_true.rb index fc5d268a6..bee79924c 100644 --- a/db/migrate/20151021190616_change_user_preferences_hide_mail_default_to_true.rb +++ b/db/migrate/20151021190616_change_user_preferences_hide_mail_default_to_true.rb @@ -1,4 +1,4 @@ -class ChangeUserPreferencesHideMailDefaultToTrue < ActiveRecord::Migration +class ChangeUserPreferencesHideMailDefaultToTrue < ActiveRecord::Migration[4.2] def self.up change_column :user_preferences, :hide_mail, :boolean, :default => true end diff --git a/db/migrate/20151024082034_add_tokens_updated_on.rb b/db/migrate/20151024082034_add_tokens_updated_on.rb index 0af28dc81..7b94a3a95 100644 --- a/db/migrate/20151024082034_add_tokens_updated_on.rb +++ b/db/migrate/20151024082034_add_tokens_updated_on.rb @@ -1,4 +1,4 @@ -class AddTokensUpdatedOn < ActiveRecord::Migration +class AddTokensUpdatedOn < ActiveRecord::Migration[4.2] def self.up add_column :tokens, :updated_on, :timestamp Token.update_all("updated_on = created_on") diff --git a/db/migrate/20151025072118_create_custom_field_enumerations.rb b/db/migrate/20151025072118_create_custom_field_enumerations.rb index ea2e5103f..c1b2eaec4 100644 --- a/db/migrate/20151025072118_create_custom_field_enumerations.rb +++ b/db/migrate/20151025072118_create_custom_field_enumerations.rb @@ -1,4 +1,4 @@ -class CreateCustomFieldEnumerations < ActiveRecord::Migration +class CreateCustomFieldEnumerations < ActiveRecord::Migration[4.2] def change create_table :custom_field_enumerations do |t| t.integer :custom_field_id, :null => false diff --git a/db/migrate/20151031095005_add_projects_default_version_id.rb b/db/migrate/20151031095005_add_projects_default_version_id.rb index 7d38f36cd..e62c54e89 100644 --- a/db/migrate/20151031095005_add_projects_default_version_id.rb +++ b/db/migrate/20151031095005_add_projects_default_version_id.rb @@ -1,4 +1,4 @@ -class AddProjectsDefaultVersionId < ActiveRecord::Migration +class AddProjectsDefaultVersionId < ActiveRecord::Migration[4.2] def self.up # Don't try to add the column if redmine_default_version plugin was used unless column_exists?(:projects, :default_version_id, :integer) diff --git a/db/migrate/20160404080304_force_password_reset_during_setup.rb b/db/migrate/20160404080304_force_password_reset_during_setup.rb index d80057a2c..00d3a65a5 100644 --- a/db/migrate/20160404080304_force_password_reset_during_setup.rb +++ b/db/migrate/20160404080304_force_password_reset_during_setup.rb @@ -1,4 +1,4 @@ -class ForcePasswordResetDuringSetup < ActiveRecord::Migration +class ForcePasswordResetDuringSetup < ActiveRecord::Migration[4.2] def up User.where(login: "admin", last_login_on: nil).update_all(must_change_passwd: true) end diff --git a/db/migrate/20160416072926_remove_position_defaults.rb b/db/migrate/20160416072926_remove_position_defaults.rb index ab3af1499..9ba7b3c8e 100644 --- a/db/migrate/20160416072926_remove_position_defaults.rb +++ b/db/migrate/20160416072926_remove_position_defaults.rb @@ -1,4 +1,4 @@ -class RemovePositionDefaults < ActiveRecord::Migration +class RemovePositionDefaults < ActiveRecord::Migration[4.2] def up [Board, CustomField, Enumeration, IssueStatus, Role, Tracker].each do |klass| change_column klass.table_name, :position, :integer, :default => nil diff --git a/db/migrate/20160529063352_add_roles_settings.rb b/db/migrate/20160529063352_add_roles_settings.rb index a4d18fcbc..84f2bf37d 100644 --- a/db/migrate/20160529063352_add_roles_settings.rb +++ b/db/migrate/20160529063352_add_roles_settings.rb @@ -1,4 +1,4 @@ -class AddRolesSettings < ActiveRecord::Migration +class AddRolesSettings < ActiveRecord::Migration[4.2] def change add_column :roles, :settings, :text end diff --git a/db/migrate/20161001122012_add_tracker_id_index_to_workflows.rb b/db/migrate/20161001122012_add_tracker_id_index_to_workflows.rb index 10c4dd97b..60c62a6f8 100644 --- a/db/migrate/20161001122012_add_tracker_id_index_to_workflows.rb +++ b/db/migrate/20161001122012_add_tracker_id_index_to_workflows.rb @@ -1,4 +1,4 @@ -class AddTrackerIdIndexToWorkflows < ActiveRecord::Migration +class AddTrackerIdIndexToWorkflows < ActiveRecord::Migration[4.2] def self.up add_index :workflows, :tracker_id end diff --git a/db/migrate/20161002133421_add_index_on_member_roles_inherited_from.rb b/db/migrate/20161002133421_add_index_on_member_roles_inherited_from.rb index 2a06a9e6c..f806a31fd 100644 --- a/db/migrate/20161002133421_add_index_on_member_roles_inherited_from.rb +++ b/db/migrate/20161002133421_add_index_on_member_roles_inherited_from.rb @@ -1,4 +1,4 @@ -class AddIndexOnMemberRolesInheritedFrom < ActiveRecord::Migration +class AddIndexOnMemberRolesInheritedFrom < ActiveRecord::Migration[4.2] def change add_index :member_roles, :inherited_from end diff --git a/db/migrate/20161010081301_change_issues_description_limit.rb b/db/migrate/20161010081301_change_issues_description_limit.rb index 0f20466a1..93fcc53ff 100644 --- a/db/migrate/20161010081301_change_issues_description_limit.rb +++ b/db/migrate/20161010081301_change_issues_description_limit.rb @@ -1,4 +1,4 @@ -class ChangeIssuesDescriptionLimit < ActiveRecord::Migration +class ChangeIssuesDescriptionLimit < ActiveRecord::Migration[4.2] def up if ActiveRecord::Base.connection.adapter_name =~ /mysql/i max_size = 16.megabytes diff --git a/db/migrate/20161010081528_change_journal_details_value_limit.rb b/db/migrate/20161010081528_change_journal_details_value_limit.rb index 2314dd535..d83fbacd6 100644 --- a/db/migrate/20161010081528_change_journal_details_value_limit.rb +++ b/db/migrate/20161010081528_change_journal_details_value_limit.rb @@ -1,4 +1,4 @@ -class ChangeJournalDetailsValueLimit < ActiveRecord::Migration +class ChangeJournalDetailsValueLimit < ActiveRecord::Migration[4.2] def up if ActiveRecord::Base.connection.adapter_name =~ /mysql/i max_size = 16.megabytes diff --git a/db/migrate/20161010081600_change_journals_notes_limit.rb b/db/migrate/20161010081600_change_journals_notes_limit.rb index 8a2ba9be6..34197bc47 100644 --- a/db/migrate/20161010081600_change_journals_notes_limit.rb +++ b/db/migrate/20161010081600_change_journals_notes_limit.rb @@ -1,4 +1,4 @@ -class ChangeJournalsNotesLimit < ActiveRecord::Migration +class ChangeJournalsNotesLimit < ActiveRecord::Migration[4.2] def up if ActiveRecord::Base.connection.adapter_name =~ /mysql/i max_size = 16.megabytes diff --git a/db/migrate/20161126094932_add_index_on_changesets_issues_issue_id.rb b/db/migrate/20161126094932_add_index_on_changesets_issues_issue_id.rb index dae77256c..1099e4ebc 100644 --- a/db/migrate/20161126094932_add_index_on_changesets_issues_issue_id.rb +++ b/db/migrate/20161126094932_add_index_on_changesets_issues_issue_id.rb @@ -1,5 +1,5 @@ -class AddIndexOnChangesetsIssuesIssueId < ActiveRecord::Migration - def change - add_index :changesets_issues, :issue_id - end -end +class AddIndexOnChangesetsIssuesIssueId < ActiveRecord::Migration[4.2]
+ def change
+ add_index :changesets_issues, :issue_id
+ end
+end
diff --git a/db/migrate/20161220091118_add_index_on_issues_parent_id.rb b/db/migrate/20161220091118_add_index_on_issues_parent_id.rb index 1cc94b098..07592a9d8 100644 --- a/db/migrate/20161220091118_add_index_on_issues_parent_id.rb +++ b/db/migrate/20161220091118_add_index_on_issues_parent_id.rb @@ -1,4 +1,4 @@ -class AddIndexOnIssuesParentId < ActiveRecord::Migration +class AddIndexOnIssuesParentId < ActiveRecord::Migration[4.2] def change add_index :issues, :parent_id end diff --git a/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb b/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb index 6f41a9c4b..3f2eaee8e 100644 --- a/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb +++ b/db/migrate/20170207050700_add_index_on_disk_filename_to_attachments.rb @@ -1,4 +1,4 @@ -class AddIndexOnDiskFilenameToAttachments < ActiveRecord::Migration +class AddIndexOnDiskFilenameToAttachments < ActiveRecord::Migration[4.2] def change add_index :attachments, :disk_filename end diff --git a/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb b/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb index df710e82c..620deb251 100644 --- a/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb +++ b/db/migrate/20170302015225_change_attachments_digest_limit_to_64.rb @@ -1,4 +1,4 @@ -class ChangeAttachmentsDigestLimitTo64 < ActiveRecord::Migration +class ChangeAttachmentsDigestLimitTo64 < ActiveRecord::Migration[4.2] def up change_column :attachments, :digest, :string, limit: 64 end diff --git a/db/migrate/20170309214320_add_project_default_assigned_to_id.rb b/db/migrate/20170309214320_add_project_default_assigned_to_id.rb index 97a4b1905..40d3282f4 100644 --- a/db/migrate/20170309214320_add_project_default_assigned_to_id.rb +++ b/db/migrate/20170309214320_add_project_default_assigned_to_id.rb @@ -1,4 +1,4 @@ -class AddProjectDefaultAssignedToId < ActiveRecord::Migration +class AddProjectDefaultAssignedToId < ActiveRecord::Migration[4.2] def up add_column :projects, :default_assigned_to_id, :integer, :default => nil # Try to copy existing settings from the plugin if redmine_default_assign plugin was used diff --git a/db/migrate/20170320051650_change_repositories_extra_info_limit.rb b/db/migrate/20170320051650_change_repositories_extra_info_limit.rb index 3b5654a6d..104111a39 100644 --- a/db/migrate/20170320051650_change_repositories_extra_info_limit.rb +++ b/db/migrate/20170320051650_change_repositories_extra_info_limit.rb @@ -1,4 +1,4 @@ -class ChangeRepositoriesExtraInfoLimit < ActiveRecord::Migration +class ChangeRepositoriesExtraInfoLimit < ActiveRecord::Migration[4.2] def up if ActiveRecord::Base.connection.adapter_name =~ /mysql/i max_size = 16.megabytes diff --git a/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb b/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb index 6f851a1f1..7c9896c98 100644 --- a/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb +++ b/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb @@ -1,4 +1,4 @@ -class AddViewNewsToAllExistingRoles < ActiveRecord::Migration +class AddViewNewsToAllExistingRoles < ActiveRecord::Migration[4.2] def up Role.all.each { |role| role.add_permission! :view_news } end diff --git a/db/migrate/20170419144536_add_view_messages_to_all_existing_roles.rb b/db/migrate/20170419144536_add_view_messages_to_all_existing_roles.rb index d010ba497..7a3ba67e3 100644 --- a/db/migrate/20170419144536_add_view_messages_to_all_existing_roles.rb +++ b/db/migrate/20170419144536_add_view_messages_to_all_existing_roles.rb @@ -1,4 +1,4 @@ -class AddViewMessagesToAllExistingRoles < ActiveRecord::Migration +class AddViewMessagesToAllExistingRoles < ActiveRecord::Migration[4.2] def up Role.all.each { |role| role.add_permission! :view_messages } end |