aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-07-17 10:38:17 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-07-17 12:38:17 +0200
commitbdcfb7eeb7caaeb9019ff0d3946153c33bc6c5e9 (patch)
tree8e0bc944f83d81a003061543f9db9139966ba985
parent48697451f2b0ba517c7d1861af3897b4ace896f9 (diff)
downloadsonarqube-bdcfb7eeb7caaeb9019ff0d3946153c33bc6c5e9.tar.gz
sonarqube-bdcfb7eeb7caaeb9019ff0d3946153c33bc6c5e9.zip
Move Java db migrations from sonar-server to sonar-db
-rw-r--r--server/sonar-server/pom.xml4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrator.java3
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStepModule.java108
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigration.java3
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/package-info.java24
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/package-info.java25
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/package-info.java25
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/package-info.java25
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java7
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ws/MigrateDbSystemAction.java4
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/ws/StatusAction.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRules.java227
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java9
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java3
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationTest.java1
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/ws/MigrateDbSystemActionTest.java14
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/ws/StatusActionTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java147
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml13
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-scm.xml13
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after.xml13
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/before.xml107
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml33
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml33
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml43
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml49
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml63
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml69
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml53
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml9
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate.xml27
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml14
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/before.xml52
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/before.xml28
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/before.xml34
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/before.xml28
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/before.xml61
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/before.xml26
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml68
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml69
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate-result.xml5
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate.xml7
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset.xml54
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset_result.xml39
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules.xml134
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules_result.xml78
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed.xml137
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed_result.xml134
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics.xml47
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics_result.xml67
-rw-r--r--server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/schema.sql33
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb33
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/410_add_oracle_id_triggers.rb1
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/432_fix_oracle_trigger_names.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/489_add_rule_tags.rb38
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/522_drop_alerts.rb31
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/534_update_measure_filters_on_language.rb45
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/537_drop_rule_tags_tables.rb77
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/604_delete_unescaped_activities.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/705_populate_projects_uuid_columns.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/710_replace_issue_filters_project_key_by_uuid.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/712_feed_snapshot_sources_updated_at.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/714_feed_file_sources.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/716_insert_projects_authorization_updated_at.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/719_feed_issue_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/721_remove_sort_field_from_issue_filters.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/750_add_issues_columns.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/753_feed_users_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/758_rename_component_related_params_in_issue_filters.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/759_copy_scm_accounts_from_authors_to_users.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/761_feed_issue_changes_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/764_feed_analysis_reports_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/770_feed_issue_tags.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/772_feed_issue_component_uuids.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_feed_issues_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/776_feed_snapshots_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/779_drop_issues_columns.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/782_feed_file_sources_binary_data.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_manual_measures_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/792_feed_events_long_dates.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/794_add_characteristic_usability_and_sub_characteristics_compliance.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/795_remove_permissions_on_modules.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/901_feed_project_links_component_uuid.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/904_feed_events_component_uuid.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/908_move_project_profile_association.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/913_feed_file_sources_data_type.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/916_feed_metrics_booleans.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/918_add_manual_measures_component_uuid.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/919_feed_manual_measures_component_uuid.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/920_remove_snapshot_libraries.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/921_remove_component_libraries.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/925_remove_duplicated_component_keys.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/README.txt18
-rw-r--r--sonar-db/pom.xml4
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/AddColumnsBuilder.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/AddColumnsBuilder.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/BaseDataChange.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/BaseDataChange.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/BaseSqlStatement.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/BaseSqlStatement.java)4
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/DataChange.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/DataChange.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/DatabaseMigration.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigration.java)4
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/DdlChange.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/DdlChange.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/DropColumnsBuilder.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/DropColumnsBuilder.java)2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/MassUpdate.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/MassUpdate.java)4
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/MigrationStep.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStep.java)2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/MigrationStepModule.java108
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/Select.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/Select.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/SelectImpl.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/SqlStatement.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/SqlStatement.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/Upsert.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/Upsert.java)2
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/UpsertImpl.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/UpsertImpl.java)3
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationStep.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationStep.java)8
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v451/DeleteUnescapedActivities.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivities.java)12
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedFileSources.java)22
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/FeedIssueLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedIssueLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/FeedSnapshotSourcesUpdatedAt.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedSnapshotSourcesUpdatedAt.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/FileSourceDto.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FileSourceDto.java)24
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationStep.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationStep.java)10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationStep.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationStep.java)17
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationStep.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationStep.java)14
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuid.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuid.java)10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/AddIssuesColumns.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddIssuesColumns.java)7
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/AddNewCharacteristics.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddNewCharacteristics.java)6
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsers.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsers.java)12
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/DropIssuesColumns.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/DropIssuesColumns.java)10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedAnalysisReportsLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedEventsLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedEventsLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryData.java)19
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueChangesLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueComponentUuids.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueComponentUuids.java)12
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueTags.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueTags.java)20
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssuesLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssuesLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedManualMeasuresLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedUsersLongDates.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedUsersLongDates.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationStep.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationStep.java)10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFilters.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFilters.java)14
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/UpdateProjectsModuleUuidPath.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java)14
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumn.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumn.java)8
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/FeedEventsComponentUuid.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedEventsComponentUuid.java)10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/FeedFileSourcesDataType.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedFileSourcesDataType.java)7
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/FeedManualMeasuresComponentUuid.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuid.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/FeedMetricsBooleans.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedMetricsBooleans.java)4
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/FeedProjectLinksComponentUuid.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuid.java)10
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociation.java)24
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/RemoveComponentLibraries.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveComponentLibraries.java)11
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/RemoveDuplicatedComponentKeys.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeys.java)8
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/RemoveSnapshotLibraries.java (renamed from server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveSnapshotLibraries.java)11
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/AddColumnsBuilderTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/AddColumnsBuilderTest.java)3
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java)10
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/DropColumnsBuilderTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/DropColumnsBuilderTest.java)3
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/MigrationStepModuleTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/MigrationStepModuleTest.java)3
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest.java)8
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/FeedFileSourcesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedFileSourcesTest.java)13
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/FeedIssueLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/FileSourceDtoTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FileSourceDtoTest.java)3
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java)6
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/AddIssuesColumnsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/AddIssuesColumnsTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/AddNewCharacteristicsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java)7
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/DropIssuesColumnsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/DropIssuesColumnsTest.java)5
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedEventsLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest.java)15
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueComponentUuidsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest.java)2
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueTagsTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueTagsTest.java)2
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssuesLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/FeedUsersLongDatesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumnTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumnTest.java)2
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/FeedEventsComponentUuidTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest.java)2
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/FeedMetricsBooleansTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/MoveProjectProfileAssociationTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/RemoveComponentLibrariesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest.java)4
-rw-r--r--sonar-db/src/test/java/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest.java)4
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/batch-insert-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/batch-insert-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/insert-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/insert-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/mass-update-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/mass-update-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/persons.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/persons.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/scroll-and-update-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/scroll-and-update-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/update-null-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/update-null-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/after.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/after.xml)8
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/before.xml)8
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/no_changes.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/no_changes.xml)4
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/before.xml)33
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute-result.xml)28
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute.xml)24
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter-result.xml)28
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter.xml)20
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/no_changes.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/no_changes.xml)16
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/execute-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/execute-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/execute.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/execute.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-scm.xml15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after.xml15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/before.xml134
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedIssueLongDatesTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest/before.xml)2
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/FeedIssueLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml)24
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml)24
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml)35
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml)23
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml)22
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml)35
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml)8
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml)5
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml)30
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_module_has_no_root_id.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_module_has_no_root_id.xml)14
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_project_has_two_active_snapshots.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_project_has_two_active_snapshots.xml)17
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml)44
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml33
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml33
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml43
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml50
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml63
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml70
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddIssuesColumnsTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddIssuesColumnsTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml73
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/empty.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/empty.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml11
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_under_wrong_characteristic.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_under_wrong_characteristic.xml)9
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_usability_exists_as_sub_characteristic.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_usability_exists_as_sub_characteristic.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists-result.xml)24
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate-result.xml)60
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate.xml35
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml19
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/update_usability_if_already_exists-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/update_usability_if_already_exists-result.xml)24
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/update_usability_if_already_exists.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/update_usability_if_already_exists.xml)9
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/before.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/no_authors.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/no_authors.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/before.xml52
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/before.xml28
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/bad_data.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/bad_data.xml)5
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/data.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/data.xml)15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest/before.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/after-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/after-result.xml)4
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/before.xml)4
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/after-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/after-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/before.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/before.xml)24
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/before.xml34
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/before.xml28
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/before.xml61
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/before.xml26
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/migrate-result.xml)12
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/migrate.xml)12
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/nothing_to_do_when_already_migrated.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/nothing_to_do_when_already_migrated.xml)12
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml68
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml69
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml)30
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml)30
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml)30
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumnTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumnTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate-result.xml6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/not_migrate_already_migrated_data.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/not_migrate_already_migrated_data.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate.xml10
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/migrate-result.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/migrate.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/migrate-result.xml)8
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/migrate.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/migrate-result.xml)12
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/migrate.xml)12
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/not_migrate_already_migrated_data.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/not_migrate_already_migrated_data.xml)12
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/migrate-result.xml)13
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/migrate.xml)15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/remove_libraries-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/remove_libraries-result.xml)11
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/remove_libraries.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/remove_libraries.xml)11
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component-result.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component.xml)15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_last_component-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_last_component-result.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_last_component.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_last_component.xml)15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/migrate-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/migrate-result.xml)6
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/migrate.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/migrate.xml)15
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/schema.sql)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/remove_libraries-result.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/remove_libraries-result.xml)16
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/remove_libraries.xml (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/remove_libraries.xml)0
-rw-r--r--sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/schema.sql (renamed from server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/schema.sql)0
325 files changed, 2092 insertions, 3234 deletions
diff --git a/server/sonar-server/pom.xml b/server/sonar-server/pom.xml
index b672cb37739..8a3deb28119 100644
--- a/server/sonar-server/pom.xml
+++ b/server/sonar-server/pom.xml
@@ -142,10 +142,6 @@
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-csv</artifactId>
- </dependency>
- <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrator.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrator.java
index d9803a18a51..79ab6a2142f 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrator.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrator.java
@@ -29,6 +29,7 @@ import org.sonar.api.server.ServerSide;
import org.sonar.api.utils.log.Loggers;
import org.sonar.db.DbClient;
import org.sonar.db.DdlUtils;
+import org.sonar.db.version.MigrationStep;
import org.sonar.server.plugins.ServerPluginRepository;
/**
@@ -48,7 +49,7 @@ public class DatabaseMigrator implements Startable {
* ServerPluginRepository is used to ensure H2 schema creation is done only after copy of bundle plugins have been done
*/
public DatabaseMigrator(DbClient dbClient, MigrationStep[] migrations, ServerUpgradeStatus serverUpgradeStatus,
- ServerPluginRepository unused) {
+ ServerPluginRepository unused) {
this.dbClient = dbClient;
this.migrations = migrations;
this.serverUpgradeStatus = serverUpgradeStatus;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStepModule.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStepModule.java
deleted file mode 100644
index 7685c9f02e9..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStepModule.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.server.db.migrations;
-
-import org.sonar.core.platform.Module;
-import org.sonar.server.db.migrations.v451.AddMissingCustomRuleParametersMigrationStep;
-import org.sonar.server.db.migrations.v451.DeleteUnescapedActivities;
-import org.sonar.server.db.migrations.v50.FeedFileSources;
-import org.sonar.server.db.migrations.v50.FeedIssueLongDates;
-import org.sonar.server.db.migrations.v50.FeedSnapshotSourcesUpdatedAt;
-import org.sonar.server.db.migrations.v50.InsertProjectsAuthorizationUpdatedAtMigrationStep;
-import org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigrationStep;
-import org.sonar.server.db.migrations.v50.RemoveSortFieldFromIssueFiltersMigrationStep;
-import org.sonar.server.db.migrations.v50.ReplaceIssueFiltersProjectKeyByUuid;
-import org.sonar.server.db.migrations.v51.AddIssuesColumns;
-import org.sonar.server.db.migrations.v51.AddNewCharacteristics;
-import org.sonar.server.db.migrations.v51.CopyScmAccountsFromAuthorsToUsers;
-import org.sonar.server.db.migrations.v51.DropIssuesColumns;
-import org.sonar.server.db.migrations.v51.FeedAnalysisReportsLongDates;
-import org.sonar.server.db.migrations.v51.FeedEventsLongDates;
-import org.sonar.server.db.migrations.v51.FeedFileSourcesBinaryData;
-import org.sonar.server.db.migrations.v51.FeedIssueChangesLongDates;
-import org.sonar.server.db.migrations.v51.FeedIssueComponentUuids;
-import org.sonar.server.db.migrations.v51.FeedIssueTags;
-import org.sonar.server.db.migrations.v51.FeedIssuesLongDates;
-import org.sonar.server.db.migrations.v51.FeedManualMeasuresLongDates;
-import org.sonar.server.db.migrations.v51.FeedSnapshotsLongDates;
-import org.sonar.server.db.migrations.v51.FeedUsersLongDates;
-import org.sonar.server.db.migrations.v51.RemovePermissionsOnModulesMigrationStep;
-import org.sonar.server.db.migrations.v51.RenameComponentRelatedParamsInIssueFilters;
-import org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath;
-import org.sonar.server.db.migrations.v52.AddManualMeasuresComponentUuidColumn;
-import org.sonar.server.db.migrations.v52.FeedEventsComponentUuid;
-import org.sonar.server.db.migrations.v52.FeedFileSourcesDataType;
-import org.sonar.server.db.migrations.v52.FeedManualMeasuresComponentUuid;
-import org.sonar.server.db.migrations.v52.FeedMetricsBooleans;
-import org.sonar.server.db.migrations.v52.FeedProjectLinksComponentUuid;
-import org.sonar.server.db.migrations.v52.MoveProjectProfileAssociation;
-import org.sonar.server.db.migrations.v52.RemoveComponentLibraries;
-import org.sonar.server.db.migrations.v52.RemoveDuplicatedComponentKeys;
-import org.sonar.server.db.migrations.v52.RemoveSnapshotLibraries;
-
-public class MigrationStepModule extends Module {
- @Override
- protected void configureModule() {
- add(
- // 4.5.1
- AddMissingCustomRuleParametersMigrationStep.class,
- DeleteUnescapedActivities.class,
-
- // 5.0
- InsertProjectsAuthorizationUpdatedAtMigrationStep.class,
- PopulateProjectsUuidColumnsMigrationStep.class,
- ReplaceIssueFiltersProjectKeyByUuid.class,
- FeedSnapshotSourcesUpdatedAt.class,
- FeedFileSources.class,
- FeedIssueLongDates.class,
- RemoveSortFieldFromIssueFiltersMigrationStep.class,
-
- // 5.1
- FeedIssueTags.class,
- FeedUsersLongDates.class,
- RenameComponentRelatedParamsInIssueFilters.class,
- CopyScmAccountsFromAuthorsToUsers.class,
- FeedIssueChangesLongDates.class,
- FeedAnalysisReportsLongDates.class,
- UpdateProjectsModuleUuidPath.class,
- FeedIssueComponentUuids.class,
- FeedSnapshotsLongDates.class,
- FeedIssuesLongDates.class,
- FeedFileSourcesBinaryData.class,
- FeedManualMeasuresLongDates.class,
- FeedEventsLongDates.class,
- AddNewCharacteristics.class,
- RemovePermissionsOnModulesMigrationStep.class,
- AddIssuesColumns.class,
- DropIssuesColumns.class,
-
- // 5.2
- FeedProjectLinksComponentUuid.class,
- FeedEventsComponentUuid.class,
- MoveProjectProfileAssociation.class,
- FeedFileSourcesDataType.class,
- FeedMetricsBooleans.class,
- AddManualMeasuresComponentUuidColumn.class,
- FeedManualMeasuresComponentUuid.class,
- RemoveSnapshotLibraries.class,
- RemoveComponentLibraries.class,
- RemoveDuplicatedComponentKeys.class);
- }
-}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigration.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigration.java
index 6addd3412f5..e94906ab460 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigration.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/PlatformDatabaseMigration.java
@@ -22,13 +22,12 @@ package org.sonar.server.db.migrations;
import java.util.Date;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.ReentrantLock;
-
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.api.utils.log.Profiler;
+import org.sonar.db.version.DatabaseMigration;
import org.sonar.server.platform.Platform;
import org.sonar.server.ruby.RubyBridge;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/package-info.java
deleted file mode 100644
index 30ddbeb60f7..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-@ParametersAreNonnullByDefault
-package org.sonar.server.db.migrations.v451;
-
-import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/package-info.java
deleted file mode 100644
index 181396f8150..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-@ParametersAreNonnullByDefault
-package org.sonar.server.db.migrations.v50;
-
-import javax.annotation.ParametersAreNonnullByDefault;
-
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/package-info.java
deleted file mode 100644
index a7804a4ffe3..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-@ParametersAreNonnullByDefault
-package org.sonar.server.db.migrations.v51;
-
-import javax.annotation.ParametersAreNonnullByDefault;
-
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/package-info.java
deleted file mode 100644
index de542c43697..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-@ParametersAreNonnullByDefault
-package org.sonar.server.db.migrations.v52;
-
-import javax.annotation.ParametersAreNonnullByDefault;
-
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
index fc0fd4cc1f8..131128ee86d 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java
@@ -29,14 +29,14 @@ import org.sonar.db.DaoUtils;
import org.sonar.db.DatabaseChecker;
import org.sonar.db.DefaultDatabase;
import org.sonar.db.MyBatis;
+import org.sonar.db.measure.custom.CustomMeasureDao;
import org.sonar.db.purge.PurgeProfiler;
import org.sonar.db.semaphore.SemaphoresImpl;
import org.sonar.db.version.DatabaseVersion;
+import org.sonar.db.version.MigrationStepModule;
import org.sonar.server.db.DbClient;
import org.sonar.server.db.EmbeddedDatabaseFactory;
-import org.sonar.server.db.migrations.MigrationStepModule;
import org.sonar.server.issue.index.IssueIndex;
-import org.sonar.db.measure.custom.CustomMeasureDao;
import org.sonar.server.metric.persistence.MetricDao;
import org.sonar.server.platform.DatabaseServerCompatibility;
import org.sonar.server.platform.DefaultServerFileSystem;
@@ -123,8 +123,7 @@ public class PlatformLevel1 extends PlatformLevel {
// Classes kept for backward compatibility of plugins/libs (like sonar-license) that are directly calling classes from the core
org.sonar.core.properties.PropertiesDao.class,
- org.sonar.core.persistence.MyBatis.class
- );
+ org.sonar.core.persistence.MyBatis.class);
addAll(CorePropertyDefinitions.all());
add(MigrationStepModule.class);
addAll(DaoUtils.getDaoClasses());
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java
index f1d7315580e..80141a36266 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelStartup.java
@@ -26,7 +26,6 @@ import org.sonar.server.qualitygate.RegisterQualityGates;
import org.sonar.server.qualityprofile.RegisterQualityProfiles;
import org.sonar.server.rule.RegisterRules;
import org.sonar.server.search.IndexSynchronizer;
-import org.sonar.server.startup.CopyRequirementsFromCharacteristicsToRules;
import org.sonar.server.startup.GeneratePluginIndex;
import org.sonar.server.startup.JdbcDriverDeployer;
import org.sonar.server.startup.LogServerId;
@@ -63,7 +62,6 @@ public class PlatformLevelStartup extends PlatformLevel {
RenameDeprecatedPropertyKeys.class,
LogServerId.class,
RegisterServletFilters.class,
- CopyRequirementsFromCharacteristicsToRules.class,
ReportQueueCleaner.class,
RegisterIssueFilters.class,
RenameIssueWidgets.class,
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ws/MigrateDbSystemAction.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ws/MigrateDbSystemAction.java
index 4b2a92feda9..9a013688032 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ws/MigrateDbSystemAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ws/MigrateDbSystemAction.java
@@ -25,10 +25,10 @@ import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
import org.sonar.api.utils.text.JsonWriter;
import org.sonar.db.Database;
+import org.sonar.db.version.DatabaseMigration;
import org.sonar.db.version.DatabaseVersion;
-import org.sonar.server.db.migrations.DatabaseMigration;
-import static org.sonar.server.db.migrations.DatabaseMigration.Status.RUNNING;
+import static org.sonar.db.version.DatabaseMigration.Status.RUNNING;
/**
* Implementation of the {@code migrate_db} action for the System WebService.
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ws/StatusAction.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ws/StatusAction.java
index 684297794f6..0282634f732 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/platform/ws/StatusAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ws/StatusAction.java
@@ -30,7 +30,7 @@ import org.sonar.api.utils.text.JsonWriter;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.IsAliveMapper;
-import org.sonar.server.db.migrations.DatabaseMigration;
+import org.sonar.db.version.DatabaseMigration;
import org.sonar.server.platform.Platform;
/**
diff --git a/server/sonar-server/src/main/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRules.java b/server/sonar-server/src/main/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRules.java
deleted file mode 100644
index eaed0e4384a..00000000000
--- a/server/sonar-server/src/main/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRules.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.sonar.server.startup;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Predicate;
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Multimap;
-import java.util.Collection;
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.sonar.api.rule.RuleStatus;
-import org.sonar.api.server.ServerSide;
-import org.sonar.api.server.debt.DebtRemediationFunction;
-import org.sonar.api.utils.Duration;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
-import org.sonar.db.DbSession;
-import org.sonar.db.MyBatis;
-import org.sonar.db.rule.RuleDto;
-import org.sonar.db.debt.CharacteristicMapper;
-import org.sonar.db.debt.RequirementMigrationDto;
-import org.sonar.db.loadedtemplate.LoadedTemplateDto;
-import org.sonar.server.db.DbClient;
-import org.sonar.server.rule.RegisterRules;
-
-/**
- * This script copy every requirements from characteristics table (every row where rule_id is not null) to the rules table.
- * <p/>
- * This script need to be executed after rules registration because default debt columns (characteristics, function, coefficient and offset) has to be populated
- * in order to be able to compare default values with overridden values.
- * <p/>
- * WARNING : When updating this class, please take time to test on ALL databases!
- *
- * @since 4.3 this component could be removed after 4 or 5 releases.
- */
-@ServerSide
-public class CopyRequirementsFromCharacteristicsToRules {
-
- private static final Logger LOGGER = Loggers.get(CopyRequirementsFromCharacteristicsToRules.class);
-
- private static final String TEMPLATE_KEY = "CopyRequirementsFromCharacteristicsToRules";
-
- private final DbClient dbClient;
-
- /**
- * @param registerRules used only to be started after init of rules
- */
- public CopyRequirementsFromCharacteristicsToRules(DbClient dbClient, RegisterRules registerRules) {
- this.dbClient = dbClient;
- }
-
- public void start() {
- doExecute();
- }
-
- private void doExecute() {
- if (dbClient.loadedTemplateDao().countByTypeAndKey(LoadedTemplateDto.ONE_SHOT_TASK_TYPE, TEMPLATE_KEY) == 0) {
- LOGGER.info("Copying requirement from characteristics to rules");
- copyRequirementsFromCharacteristicsToRules();
-
- LOGGER.info("Deleting requirements from characteristics");
- removeRequirementsDataFromCharacteristics();
-
- dbClient.loadedTemplateDao().insert(new LoadedTemplateDto(TEMPLATE_KEY, LoadedTemplateDto.ONE_SHOT_TASK_TYPE));
- }
- }
-
- private void copyRequirementsFromCharacteristicsToRules() {
- DbSession dbSession = dbClient.openSession(true);
-
- try {
- List<RequirementMigrationDto> requirementDtos = dbSession.getMapper(CharacteristicMapper.class).selectDeprecatedRequirements();
- if (requirementDtos.isEmpty()) {
- LOGGER.info("No requirement need to be copied", requirementDtos);
-
- } else {
- int requirementCopied = 0;
-
- final Multimap<Integer, RequirementMigrationDto> requirementsByRuleId = ArrayListMultimap.create();
- for (RequirementMigrationDto requirementDto : requirementDtos) {
- requirementsByRuleId.put(requirementDto.getRuleId(), requirementDto);
- }
-
- List<RuleDto> rules = dbClient.ruleDao().findAll(dbSession);
- for (RuleDto rule : rules) {
- Collection<RequirementMigrationDto> requirementsForRule = requirementsByRuleId.get(rule.getId());
- if (!requirementsForRule.isEmpty()) {
- convert(rule, requirementsForRule, dbSession);
- requirementCopied++;
- }
- }
- dbSession.commit();
-
- LOGGER.info("{} requirements have been found, {} have been copied", requirementDtos.size(), requirementCopied);
- }
- } finally {
- MyBatis.closeQuietly(dbSession);
- }
- }
-
- private void convert(RuleDto rule, Collection<RequirementMigrationDto> requirementsForRule, DbSession session) {
- RequirementMigrationDto enabledRequirement = enabledRequirement(requirementsForRule);
-
- if (enabledRequirement == null && RuleStatus.REMOVED != rule.getStatus()) {
- // If no enabled requirement is found, it means that the requirement has been disabled for this rule
- convertDisableRequirement(rule, session);
-
- } else if (enabledRequirement != null) {
- // If one requirement is enable, it means either that this requirement has been set from SQALE, or that it come from a XML model
- // definition
- convertEnabledRequirement(rule, enabledRequirement, session);
-
- // When default values on debt are the same that ones set by SQALE, nothing to do
- }
- }
-
- @CheckForNull
- private static RequirementMigrationDto enabledRequirement(Collection<RequirementMigrationDto> requirementsForRule) {
- return Iterables.find(requirementsForRule, EnabledRequirement.INSTANCE, null);
- }
-
- private void convertDisableRequirement(RuleDto rule, DbSession session) {
- rule.setSubCharacteristicId(RuleDto.DISABLED_CHARACTERISTIC_ID);
- rule.setRemediationFunction(null);
- rule.setRemediationCoefficient(null);
- rule.setRemediationOffset(null);
- dbClient.ruleDao().update(session, rule);
- }
-
- private void convertEnabledRequirement(RuleDto ruleRow, RequirementMigrationDto enabledRequirement, DbSession session) {
- ruleRow.setSubCharacteristicId(enabledRequirement.getParentId() != null ? enabledRequirement.getParentId() : null);
- ruleRow.setRemediationFunction(enabledRequirement.getFunction().toUpperCase());
- ruleRow.setRemediationCoefficient(convertDuration(enabledRequirement.getCoefficientValue(), enabledRequirement.getCoefficientUnit()));
- ruleRow.setRemediationOffset(convertDuration(enabledRequirement.getOffsetValue(), enabledRequirement.getOffsetUnit()));
-
- // Constant/issue with coefficient is replaced by Constant/issue with offset (with no coefficient)
- if (DebtRemediationFunction.Type.CONSTANT_ISSUE.name().equals(ruleRow.getRemediationFunction())
- && ruleRow.getRemediationCoefficient() != null) {
- ruleRow.setRemediationOffset(ruleRow.getRemediationCoefficient());
- ruleRow.setRemediationCoefficient(null);
- }
-
- // If the coefficient of a linear or linear with offset function is null, it should be replaced by 0
- if ((DebtRemediationFunction.Type.LINEAR.name().equals(ruleRow.getRemediationFunction()) ||
- DebtRemediationFunction.Type.LINEAR_OFFSET.name().equals(ruleRow.getRemediationFunction()))
- && ruleRow.getRemediationCoefficient() == null) {
- ruleRow.setRemediationCoefficient("0" + convertUnit(enabledRequirement.getCoefficientUnit()));
- // If the offset of a constant per issue or linear with offset function is null, it should be replaced by 0
- } else if ((DebtRemediationFunction.Type.CONSTANT_ISSUE.name().equals(ruleRow.getRemediationFunction())
- || DebtRemediationFunction.Type.LINEAR_OFFSET.name().equals(ruleRow.getRemediationFunction()))
- && ruleRow.getRemediationOffset() == null) {
- ruleRow.setRemediationOffset("0" + convertUnit(enabledRequirement.getOffsetUnit()));
- }
-
- if (!isDebtDefaultValuesSameAsOverriddenValues(ruleRow)) {
- // Default values on debt are not the same that ones set by SQALE, update the rule
- dbClient.ruleDao().update(session, ruleRow);
- }
- }
-
- @CheckForNull
- @VisibleForTesting
- static String convertDuration(@Nullable Double oldValue, @Nullable String oldUnit) {
- if (oldValue != null && oldValue > 0) {
- // As value is stored in double, we have to round it in order to have an integer (for instance, if it was 1.6, we'll use 2)
- return Integer.toString((int) Math.round(oldValue)) + convertUnit(oldUnit);
- }
- return null;
- }
-
- @VisibleForTesting
- private static String convertUnit(@Nullable String oldUnit) {
- String unit = oldUnit != null ? oldUnit : Duration.DAY;
- return "mn".equals(unit) ? Duration.MINUTE : unit;
- }
-
- @VisibleForTesting
- static boolean isDebtDefaultValuesSameAsOverriddenValues(RuleDto rule) {
- return new EqualsBuilder()
- .append(rule.getDefaultSubCharacteristicId(), rule.getSubCharacteristicId())
- .append(rule.getDefaultRemediationFunction(), rule.getRemediationFunction())
- .append(rule.getDefaultRemediationCoefficient(), rule.getRemediationCoefficient())
- .append(rule.getDefaultRemediationOffset(), rule.getRemediationOffset())
- .isEquals();
- }
-
- private void removeRequirementsDataFromCharacteristics() {
- DbSession dbSession = dbClient.openSession(false);
- try {
- dbSession.getMapper(CharacteristicMapper.class).deleteRequirementsFromCharacteristicsTable();
- dbSession.commit();
- } finally {
- MyBatis.closeQuietly(dbSession);
- }
- }
-
- private enum EnabledRequirement implements Predicate<RequirementMigrationDto> {
- INSTANCE;
-
- @Override
- public boolean apply(@Nullable RequirementMigrationDto input) {
- return input != null && input.isEnabled();
- }
- }
-}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
index 7ffa42cd1b7..404a93a8c16 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/ui/JRubyFacade.java
@@ -27,7 +27,6 @@ import java.util.List;
import java.util.Map;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-
import org.sonar.api.Plugin;
import org.sonar.api.config.License;
import org.sonar.api.config.PropertyDefinitions;
@@ -41,16 +40,16 @@ import org.sonar.api.web.Footer;
import org.sonar.api.web.Page;
import org.sonar.api.web.RubyRailsWebservice;
import org.sonar.api.web.Widget;
-import org.sonar.db.Database;
-import org.sonar.db.version.DatabaseVersion;
import org.sonar.core.platform.ComponentContainer;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
-import org.sonar.db.component.ResourceIndexDao;
import org.sonar.core.timemachine.Periods;
+import org.sonar.db.Database;
+import org.sonar.db.component.ResourceIndexDao;
+import org.sonar.db.version.DatabaseMigration;
+import org.sonar.db.version.DatabaseVersion;
import org.sonar.process.ProcessProperties;
import org.sonar.server.component.ComponentCleanerService;
-import org.sonar.server.db.migrations.DatabaseMigration;
import org.sonar.server.db.migrations.DatabaseMigrator;
import org.sonar.server.measure.MeasureFilterEngine;
import org.sonar.server.measure.MeasureFilterResult;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java
index b0962aa7fa5..acbf8a53b3c 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DatabaseMigratorTest.java
@@ -31,6 +31,7 @@ import org.sonar.db.DbSession;
import org.sonar.db.dialect.Dialect;
import org.sonar.db.dialect.H2;
import org.sonar.db.dialect.MySql;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.anyBoolean;
@@ -45,7 +46,7 @@ public class DatabaseMigratorTest {
public ExpectedException thrown = ExpectedException.none();
DbClient dbClient = mock(DbClient.class, Mockito.RETURNS_DEEP_STUBS);
- MigrationStep[] migrations = new MigrationStep[]{new FakeMigrationStep()};
+ MigrationStep[] migrations = new MigrationStep[] {new FakeMigrationStep()};
ServerUpgradeStatus serverUpgradeStatus = mock(ServerUpgradeStatus.class);
DatabaseMigrator migrator;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationTest.java
index 42a77b8ffc2..47a7c17e5a6 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/PlatformDatabaseMigrationTest.java
@@ -22,6 +22,7 @@ package org.sonar.server.db.migrations;
import java.util.Date;
import org.junit.Test;
import org.mockito.InOrder;
+import org.sonar.db.version.DatabaseMigration;
import org.sonar.server.platform.Platform;
import org.sonar.server.ruby.RubyBridge;
import org.sonar.server.ruby.RubyDatabaseMigration;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/MigrateDbSystemActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/MigrateDbSystemActionTest.java
index 9948abedd91..69a5a15b5a7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/MigrateDbSystemActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/MigrateDbSystemActionTest.java
@@ -28,10 +28,10 @@ import org.junit.Test;
import org.sonar.api.server.ws.Request;
import org.sonar.api.utils.DateUtils;
import org.sonar.db.Database;
-import org.sonar.db.version.DatabaseVersion;
import org.sonar.db.dialect.Dialect;
-import org.sonar.server.db.migrations.DatabaseMigration;
-import org.sonar.server.db.migrations.DatabaseMigration.Status;
+import org.sonar.db.version.DatabaseMigration;
+import org.sonar.db.version.DatabaseMigration.Status;
+import org.sonar.db.version.DatabaseVersion;
import org.sonar.server.ws.WsTester;
import static com.google.common.base.Predicates.in;
@@ -40,10 +40,10 @@ import static com.google.common.collect.Iterables.filter;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.sonar.server.db.migrations.DatabaseMigration.Status.FAILED;
-import static org.sonar.server.db.migrations.DatabaseMigration.Status.NONE;
-import static org.sonar.server.db.migrations.DatabaseMigration.Status.RUNNING;
-import static org.sonar.server.db.migrations.DatabaseMigration.Status.SUCCEEDED;
+import static org.sonar.db.version.DatabaseMigration.Status.FAILED;
+import static org.sonar.db.version.DatabaseMigration.Status.NONE;
+import static org.sonar.db.version.DatabaseMigration.Status.RUNNING;
+import static org.sonar.db.version.DatabaseMigration.Status.SUCCEEDED;
import static org.sonar.test.JsonAssert.assertJson;
public class MigrateDbSystemActionTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/StatusActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/StatusActionTest.java
index cc75a926a98..fd241e7514e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/platform/ws/StatusActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/platform/ws/StatusActionTest.java
@@ -30,7 +30,7 @@ import org.sonar.api.server.ws.WebService;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.IsAliveMapper;
-import org.sonar.server.db.migrations.DatabaseMigration;
+import org.sonar.db.version.DatabaseMigration;
import org.sonar.server.platform.Platform;
import org.sonar.server.ws.WsTester;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java b/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java
deleted file mode 100644
index c1b557dccea..00000000000
--- a/server/sonar-server/src/test/java/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.server.startup;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-import org.sonar.api.utils.DateUtils;
-import org.sonar.api.utils.System2;
-import org.sonar.db.DbTester;
-import org.sonar.db.loadedtemplate.LoadedTemplateDao;
-import org.sonar.db.rule.RuleDto;
-import org.sonar.server.db.DbClient;
-import org.sonar.server.rule.db.RuleDao;
-import org.sonar.test.DbTests;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.when;
-
-@Category(DbTests.class)
-@RunWith(MockitoJUnitRunner.class)
-public class CopyRequirementsFromCharacteristicsToRulesTest {
-
- @Rule
- public DbTester db = DbTester.create(System2.INSTANCE);
-
- @Mock
- System2 system2;
-
- DbClient dbClient;
-
- CopyRequirementsFromCharacteristicsToRules service;
-
- @Before
- public void setUp() {
- when(system2.now()).thenReturn(DateUtils.parseDate("2014-03-13").getTime());
- dbClient = new DbClient(db.database(), db.myBatis(), new RuleDao(system2), new LoadedTemplateDao(db.myBatis()));
- service = new CopyRequirementsFromCharacteristicsToRules(dbClient, null);
- }
-
- @Test
- public void copy_requirements_from_characteristics_to_rules() {
- db.prepareDbUnit(getClass(), "copy_requirements_from_characteristics_to_rules.xml");
-
- service.start();
-
- db.assertDbUnit(getClass(), "copy_requirements_from_characteristics_to_rules_result.xml", "rules", "loaded_templates");
- }
-
- /**
- * SONAR-5335
- */
- @Test
- public void convert_constant_issue_with_coeff_to_constant_issue_with_offset() {
- db.prepareDbUnit(getClass(), "convert_constant_issue_with_coeff_to_constant_issue_with_offset.xml");
-
- service.start();
-
- db.assertDbUnit(getClass(), "convert_constant_issue_with_coeff_to_constant_issue_with_offset_result.xml", "rules");
- }
-
- @Test
- public void remove_requirements_data_from_characteristics() {
- db.prepareDbUnit(getClass(), "remove_requirements_data_from_characteristics.xml");
-
- service.start();
-
- db.assertDbUnit(getClass(), "remove_requirements_data_from_characteristics_result.xml", "characteristics");
- }
-
- @Test
- public void do_nothing_when_already_executed() {
- db.prepareDbUnit(getClass(), "do_nothing_when_already_executed.xml");
-
- service.start();
-
- db.assertDbUnit(getClass(), "do_nothing_when_already_executed_result.xml", "rules");
- }
-
- @Test
- public void convert_duration() {
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(1.0, "h")).isEqualTo("1h");
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(15.0, "d")).isEqualTo("15d");
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(5.0, "min")).isEqualTo("5min");
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(5.0, "mn")).isEqualTo("5min");
-
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(0.9, "h")).isEqualTo("1h");
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(1.4, "h")).isEqualTo("1h");
-
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(1.0, null)).isEqualTo("1d");
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(null, "d")).isNull();
-
- assertThat(CopyRequirementsFromCharacteristicsToRules.convertDuration(0.0, "d")).isNull();
- }
-
- @Test
- public void is_debt_default_values_same_as_overridden_values() {
- assertThat(CopyRequirementsFromCharacteristicsToRules.isDebtDefaultValuesSameAsOverriddenValues(new RuleDto()
- .setDefaultSubCharacteristicId(1).setSubCharacteristicId(1)
- .setDefaultRemediationFunction("LINEAR_OFFSET").setRemediationFunction("LINEAR_OFFSET")
- .setDefaultRemediationCoefficient("5h").setRemediationCoefficient("5h")
- .setDefaultRemediationOffset("10min").setRemediationOffset("10min")
- )).isTrue();
-
- assertThat(CopyRequirementsFromCharacteristicsToRules.isDebtDefaultValuesSameAsOverriddenValues(new RuleDto()
- .setDefaultSubCharacteristicId(1).setSubCharacteristicId(2)
- .setDefaultRemediationFunction("LINEAR_OFFSET").setRemediationFunction("LINEAR_OFFSET")
- .setDefaultRemediationCoefficient("5h").setRemediationCoefficient("5h")
- .setDefaultRemediationOffset("10min").setRemediationOffset("10min")
- )).isFalse();
-
- assertThat(CopyRequirementsFromCharacteristicsToRules.isDebtDefaultValuesSameAsOverriddenValues(new RuleDto()
- .setDefaultSubCharacteristicId(1).setSubCharacteristicId(1)
- .setDefaultRemediationFunction("LINEAR_OFFSET").setRemediationFunction("LINEAR_OFFSET")
- .setDefaultRemediationCoefficient("5h").setRemediationCoefficient("4h")
- .setDefaultRemediationOffset("10min").setRemediationOffset("5min")
- )).isFalse();
-
- assertThat(CopyRequirementsFromCharacteristicsToRules.isDebtDefaultValuesSameAsOverriddenValues(new RuleDto()
- .setDefaultSubCharacteristicId(1).setSubCharacteristicId(1)
- .setDefaultRemediationFunction("CONSTANT_ISSUE").setRemediationFunction("LINEAR")
- .setDefaultRemediationCoefficient(null).setRemediationCoefficient("5h")
- .setDefaultRemediationOffset("10min").setRemediationOffset(null)
- )).isFalse();
- }
-}
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml
deleted file mode 100644
index 7762dcd311d..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<dataset>
-
- <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000" updated_at="1414770242000"
- data=""
- line_hashes=""
- data_hash="" />
-
- <file_sources id="2" project_uuid="uuid-MyProject" file_uuid="uuid-MyFile.xoo" created_at="1416238020000" updated_at="1414770242000"
- data=",,,,,,,,,,,,,,,class Foo {&#13;&#10;,,,,,,,,,,,,,,, // Empty&#13;&#10;,,,,,,,,,,,,,,,}&#13;&#10;,,,,,,,,,,,,,,,&#13;&#10;"
- line_hashes="6a19ce786467960a3a9b0d26383a464a&#10;aab2dbc5fdeaa80b050b1d049ede357c&#10;cbb184dd8e05c9709e5dcaedaa0495cf&#10;&#10;"
- data_hash="" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-scm.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-scm.xml
deleted file mode 100644
index e44511b3d6f..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after-with-scm.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<dataset>
-
- <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000" updated_at="1414770242000"
- data=""
- line_hashes=""
- data_hash="" />
-
- <file_sources id="2" project_uuid="uuid-MyProject" file_uuid="uuid-MyFile.xoo" created_at="1416238020000" updated_at="1414770242000"
- data="aef12a,alice,2014-04-25T12:34:56+0100,1,4,2,2,5,3,3,6,4,,,1,class Foo {&#13;&#10;abe465,bob,2014-07-25T12:34:56+0100,,,,,,,,,,,,2, // Empty&#13;&#10;afb789,carol,2014-03-23T12:34:56+0100,0,,,0,,,0,,,,,,}&#13;&#10;afb789,carol,2014-03-23T12:34:56+0100,,,,,,,,,,,,,&#13;&#10;"
- line_hashes="6a19ce786467960a3a9b0d26383a464a&#10;aab2dbc5fdeaa80b050b1d049ede357c&#10;cbb184dd8e05c9709e5dcaedaa0495cf&#10;&#10;"
- data_hash="" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after.xml
deleted file mode 100644
index 7762dcd311d..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/after.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<dataset>
-
- <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000" updated_at="1414770242000"
- data=""
- line_hashes=""
- data_hash="" />
-
- <file_sources id="2" project_uuid="uuid-MyProject" file_uuid="uuid-MyFile.xoo" created_at="1416238020000" updated_at="1414770242000"
- data=",,,,,,,,,,,,,,,class Foo {&#13;&#10;,,,,,,,,,,,,,,, // Empty&#13;&#10;,,,,,,,,,,,,,,,}&#13;&#10;,,,,,,,,,,,,,,,&#13;&#10;"
- line_hashes="6a19ce786467960a3a9b0d26383a464a&#10;aab2dbc5fdeaa80b050b1d049ede357c&#10;cbb184dd8e05c9709e5dcaedaa0495cf&#10;&#10;"
- data_hash="" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/before.xml
deleted file mode 100644
index 3dced7c48ee..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/before.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<dataset>
-
- <metrics id="1" name="revisions_by_line" description="[null]" direction="0" domain="SCM" short_name="Revisions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="2" name="authors_by_line" description="[null]" direction="0" domain="SCM" short_name="Authors by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="3" name="last_commit_datetimes_by_line" description="[null]" direction="0" domain="SCM" short_name="Last commit dates by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="4" name="coverage_line_hits_data" description="[null]" direction="0" domain="Test" short_name="Coverage hits by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="5" name="conditions_by_line" description="[null]" direction="0" domain="Tests" short_name="Conditions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="6" name="covered_conditions_by_line" description="[null]" direction="0" domain="Tests" short_name="Covered conditions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="7" name="it_coverage_line_hits_data" description="[null]" direction="0" domain="Test" short_name="Coverage hits by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="8" name="it_conditions_by_line" description="[null]" direction="0" domain="Tests" short_name="Conditions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="9" name="it_covered_conditions_by_line" description="[null]" direction="0" domain="Tests" short_name="Covered conditions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="10" name="overall_coverage_line_hits_data" description="[null]" direction="0" domain="Test" short_name="Coverage hits by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="11" name="overall_conditions_by_line" description="[null]" direction="0" domain="Tests" short_name="Conditions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="12" name="overall_covered_conditions_by_line" description="[null]" direction="0" domain="Tests" short_name="Covered conditions by line" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
- <metrics id="13" name="duplications_data" description="[null]" direction="0" domain="Duplications" short_name="Duplication data" qualitative="false" val_type="DATA"
- user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]" optimized_best_value="[null]" hidden="[false]" delete_historical_data="false" />
-
- <projects id="1" uuid="uuid-MyProject" kee="MyProject" scope="PRJ" qualifier="TRK" />
- <projects id="2" uuid="uuid-prj" kee="MyProject:src/main/xoo/prj" scope="DIR" qualifier="DIR" />
- <projects id="3" uuid="uuid-MyFile.xoo" kee="MyProject:src/main/xoo/prj/MyFile.xoo" scope="FIL" qualifier="FIL" />
- <projects id="4" uuid="uuid-Migrated.xoo" kee="MyProject:src/main/xoo/prj/Migrated.xoo" scope="FIL" qualifier="FIL" />
-
- <snapshots id="1" project_id="1" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
- status="P" islast="[false]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- depth="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02" build_date="2011-09-29"
- version="2.1-SNAPSHOT" path="1.2."/>
- <snapshots id="2" project_id="1" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
- status="P" islast="[true]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- depth="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02" build_date="2011-09-29"
- version="2.1-SNAPSHOT" path="1.2."/>
-
- <snapshots id="3" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
- status="P" islast="[false]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- depth="1" scope="DIR" qualifier="DIR" created_at="2008-12-02" build_date="2011-09-29"
- version="2.1-SNAPSHOT" path="1.2."/>
- <snapshots id="4" project_id="2" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="2"
- status="P" islast="[true]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- depth="1" scope="DIR" qualifier="DIR" created_at="2008-12-02" build_date="2011-09-29"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- version="2.1-SNAPSHOT" path="1.2."/>
-
- <snapshots id="5" project_id="3" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
- status="P" islast="[false]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- depth="1" scope="DIR" qualifier="DIR" created_at="2008-12-02" build_date="2011-09-29"
- version="2.1-SNAPSHOT" path="1.2."/>
- <snapshots id="6" project_id="3" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="2"
- status="P" islast="[true]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- depth="1" scope="FIL" qualifier="FIL" created_at="2008-12-02" build_date="2011-09-29"
- version="2.1-SNAPSHOT" path="1.2."/>
-
- <snapshots id="7" project_id="4" parent_snapshot_id="5" root_project_id="1" root_snapshot_id="2"
- status="P" islast="[true]" purge_status="1"
- period1_mode="days1" period1_param="30" period1_date="2011-09-24"
- period2_mode="days2" period2_param="31" period2_date="2011-09-25"
- period3_mode="days3" period3_param="32" period3_date="2011-09-26"
- period4_mode="days4" period4_param="33" period4_date="2011-09-27"
- period5_mode="days5" period5_param="34" period5_date="2011-09-28"
- depth="1" scope="FIL" qualifier="FIL" created_at="2008-12-02" build_date="2011-09-29"
- version="2.1-SNAPSHOT" path="1.2."/>
-
- <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000" updated_at="1414770242000"
- data=""
- line_hashes=""
- data_hash="" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml
deleted file mode 100644
index 444d7d5f37a..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<dataset>
-
- <issue_filters
- id="1"
- name="No sort field"
- user_login="stephane"
- shared="[true]"
- description="no not touch"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="2"
- name="Has sort field"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|projectUuids=ABC"
- created_at="2013-06-10"
- updated_at="2014-10-29 00:00:00.0" />
-
- <issue_filters
- id="3"
- name="corner-case"
- user_login="michael"
- shared="[true]"
- description="do not touch"
- data="statuses=CLOSED|resort=true"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml
deleted file mode 100644
index 6ba632e10cb..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<dataset>
-
- <issue_filters
- id="1"
- name="No sort field"
- user_login="stephane"
- shared="[true]"
- description="no not touch"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="2"
- name="Has sort field"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|asc=true|projectUuids=ABC"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="3"
- name="corner-case"
- user_login="michael"
- shared="[true]"
- description="do not touch"
- data="statuses=CLOSED|resort=true"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml
deleted file mode 100644
index bad7a2c3797..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<dataset>
-
- <issue_filters
- id="1"
- name="Struts Issues"
- user_login="stephane"
- shared="[true]"
- description="All issues of Struts"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="2"
- name="Open issues"
- user_login="michael"
- shared="[false]"
- description="All open issues"
- data="statuses=OPEN"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="3"
- name="Sonar Open issues"
- user_login="michael"
- shared="[true]"
- description="All open issues on Sonar"
- data="statuses=CLOSED|projectUuids=ABCD|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="4"
- name="Bad component roots fields"
- user_login="michael"
- shared="[true]"
- description="All open issues on Sonar"
- data="statuses=CLOSED|projectUuids=|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml
deleted file mode 100644
index 0030a5b0b03..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<dataset>
-
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
- uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
- description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
-
- <issue_filters
- id="1"
- name="Struts Issues"
- user_login="stephane"
- shared="[true]"
- description="All issues of Struts"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="2"
- name="Open issues"
- user_login="michael"
- shared="[false]"
- description="All open issues"
- data="statuses=OPEN"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="3"
- name="Sonar Open issues"
- user_login="michael"
- shared="[true]"
- description="All open issues on Sonar"
- data="statuses=CLOSED|projectUuids=ABCD|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="4"
- name="Bad component roots fields"
- user_login="michael"
- shared="[true]"
- description="All open issues on Sonar"
- data="statuses=CLOSED|projectUuids=|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml
deleted file mode 100644
index 082e2f5d7c9..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<dataset>
-
- <issue_filters
- id="1"
- name="Struts Issues"
- user_login="stephane"
- shared="[true]"
- description="All issues of Struts"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2014-10-29" />
-
- <issue_filters
- id="2"
- name="Open issues"
- user_login="michael"
- shared="[false]"
- description="All open issues"
- data="statuses=OPEN"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="3"
- name="Sonar Open issues"
- user_login="michael"
- shared="[true]"
- description="All open issues on Sonar"
- data="statuses=CLOSED|projectUuids=ABCD|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2014-10-29" />
-
- <issue_filters
- id="4"
- name="Bad component roots fields"
- user_login="michael"
- shared="[true]"
- description="Bad component roots fields"
- data="statuses=CLOSED||resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2014-10-29" />
-
- <issue_filters
- id="5"
- name="Linked on not existing file"
- user_login="michael"
- shared="[true]"
- description="Linked on not existing file"
- data="statuses=CLOSED||resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2014-10-29" />
-
- <issue_filters
- id="6"
- name="Empty data"
- user_login="michael"
- shared="[true]"
- description="Empty data"
- data="[null]"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml
deleted file mode 100644
index 811ac2b92d0..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<dataset>
-
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
- uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
- description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
-
- <issue_filters
- id="1"
- name="Struts Issues"
- user_login="stephane"
- shared="[true]"
- description="All issues of Struts"
- data="componentRoots=org.struts:struts"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="2"
- name="Open issues"
- user_login="michael"
- shared="[false]"
- description="All open issues"
- data="statuses=OPEN"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="3"
- name="Sonar Open issues"
- user_login="michael"
- shared="[true]"
- description="All open issues on Sonar"
- data="statuses=CLOSED|componentRoots=org.struts:struts|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="4"
- name="Bad component roots fields"
- user_login="michael"
- shared="[true]"
- description="Bad component roots fields"
- data="statuses=CLOSED|componentRoots=|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="5"
- name="Linked on not existing file"
- user_login="michael"
- shared="[true]"
- description="Linked on not existing file"
- data="statuses=CLOSED|componentRoots=unknown|resolution=FIXED"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <issue_filters
- id="6"
- name="Empty data"
- user_login="michael"
- shared="[true]"
- description="Empty data"
- data="[null]"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml
deleted file mode 100644
index b8ff37c389e..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<dataset>
-
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
- <characteristics id="2" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="3" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
- <characteristics id="4" kee="PORTABILITY_COMPLIANCE" name="Portability Compliance" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="5" kee="MAINTAINABILITY" name="Maintainability" parent_id="[null]" rule_id="[null]" characteristic_order="3" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
- <characteristics id="6" kee="MAINTAINABILITY_COMPLIANCE" name="Maintainability Compliance" parent_id="5" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="7" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
- <characteristics id="8" kee="SECURITY_COMPLIANCE" name="Security Compliance" parent_id="7" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
-
- <characteristics id="9" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="5" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
- <characteristics id="10" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="9" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
- <characteristics id="11" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="9" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
- <characteristics id="12" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="9" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="13" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]" characteristic_order="6" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-20"/>
- <characteristics id="14" kee="EFFICIENCY_COMPLIANCE" name="Efficiency Compliance" parent_id="13" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="15" kee="CHANGEABILITY" name="Changeability" parent_id="[null]" rule_id="[null]" characteristic_order="7" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-20"/>
- <characteristics id="16" kee="CHANGEABILITY_COMPLIANCE" name="Changeability Compliance" parent_id="15" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="17" kee="RELIABILITY" name="Reliability" parent_id="[null]" rule_id="[null]" characteristic_order="8" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-20"/>
- <characteristics id="18" kee="RELIABILITY_COMPLIANCE" name="Reliability Compliance" parent_id="17" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="19" kee="TESTABILITY" name="Testability" parent_id="[null]" rule_id="[null]" characteristic_order="9" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-20"/>
- <characteristics id="20" kee="TESTABILITY_COMPLIANCE" name="Testability Compliance" parent_id="19" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml
deleted file mode 100644
index 1f2f39bdbef..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<dataset>
-
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="2" kee="REUSABILITY_COMPLIANCE" name="Compliance" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate.xml
deleted file mode 100644
index 2d92c7cc413..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<dataset>
-
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="3" kee="MAINTAINABILITY" name="Maintainability" parent_id="[null]" rule_id="[null]" characteristic_order="3" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="4" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="5" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]" characteristic_order="5" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="6" kee="CHANGEABILITY" name="Changeability" parent_id="[null]" rule_id="[null]" characteristic_order="6" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="7" kee="RELIABILITY" name="Reliability" parent_id="[null]" rule_id="[null]" characteristic_order="7" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
- <characteristics id="8" kee="TESTABILITY" name="Testability" parent_id="[null]" rule_id="[null]" characteristic_order="8" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml
deleted file mode 100644
index 6953f5230bb..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<dataset>
-
- <characteristics id="1" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
- updated_at="2013-11-22"/>
- <characteristics id="2" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
- <characteristics id="3" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
- updated_at="[null]"/>
- <characteristics id="4" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="5" kee="[null]" name="[null]" parent_id="3" rule_id="3" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20" updated_at="2013-11-22"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/before.xml
deleted file mode 100644
index 771b77c4a62..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/before.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<dataset>
- <!-- new migration -->
- <analysis_reports
- id="1"
- project_key="123456789-987654321"
- snapshot_id="123"
- report_data="data-project"
- report_status="WORKING"
- created_at="2014-09-25"
- updated_at="2014-09-24"
- started_at="2014-09-23"
- finished_at="2014-09-22"
- created_at_ms="[null]"
- updated_at_ms="[null]"
- started_at_ms="[null]"
- finished_at_ms="[null]"
- />
-
- <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
- <analysis_reports
- id="2"
- project_key="123456789-987654321"
- snapshot_id="123"
- report_data="data-project"
- report_status="WORKING"
- created_at="2014-09-25"
- updated_at="2014-09-24"
- started_at="2014-09-23"
- finished_at="2014-09-22"
- created_at_ms="1500000000000"
- updated_at_ms="1500000000000"
- started_at_ms="1500000000000"
- finished_at_ms="1500000000000"
- />
-
- <!-- NULL dates -->
- <analysis_reports
- id="3"
- project_key="123456789-987654321"
- snapshot_id="123"
- report_data="data-project"
- report_status="WORKING"
- created_at="[null]"
- updated_at="[null]"
- started_at="[null]"
- finished_at="[null]"
- created_at_ms="[null]"
- updated_at_ms="[null]"
- started_at_ms="[null]"
- finished_at_ms="[null]"
- />
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/before.xml
deleted file mode 100644
index 52ad14d35b2..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/before.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<dataset>
- <!-- new migration -->
- <events
- id="1"
- created_at="2014-09-25"
- created_at_ms="[null]"
- event_date="2014-09-25"
- event_date_ms="[null]"
- />
-
- <!-- re-entrant migration - ignore the ones that are already fed with new dates -->
- <events
- id="2"
- created_at="2014-09-25"
- created_at_ms="1500000000"
- event_date="2014-09-25"
- event_date_ms="1500000000"
- />
-
- <!-- NULL dates -->
- <events
- id="3"
- created_at="[null]"
- created_at_ms="[null]"
- event_date="[null]"
- event_date_ms="[null]"
- />
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/before.xml
deleted file mode 100644
index 96b11d118ae..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/before.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<dataset>
- <!-- new migration -->
- <issues
- id="1"
- issue_creation_date="2014-09-25"
- issue_creation_date_ms="[null]"
- issue_update_date="2014-09-25"
- issue_update_date_ms="[null]"
- issue_close_date="2014-09-25"
- issue_close_date_ms="[null]"
- />
-
- <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
- <issues
- id="2"
- issue_creation_date="2014-09-25"
- issue_creation_date_ms="1500000000"
- issue_update_date="2014-09-25"
- issue_update_date_ms="1500000000"
- issue_close_date="2014-09-25"
- issue_close_date_ms="1500000000"
- />
-
- <!-- NULL dates -->
- <issues
- id="3"
- issue_creation_date="[null]"
- issue_creation_date_ms="[null]"
- issue_update_date="[null]"
- issue_update_date_ms="[null]"
- issue_close_date="[null]"
- issue_close_date_ms="[null]"
- />
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/before.xml
deleted file mode 100644
index f717cc25313..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/before.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<dataset>
- <!-- new migration -->
- <manual_measures
- id="1"
- created_at="2014-09-25"
- created_at_ms="[null]"
- updated_at="2014-09-25"
- updated_at_ms="[null]"
- />
-
- <!-- re-entrant migration - ignore the ones that are already fed with new dates -->
- <manual_measures
- id="2"
- created_at="2014-09-25"
- created_at_ms="1500000000"
- updated_at="2014-09-25"
- updated_at_ms="1500000000"
- />
-
- <!-- NULL dates -->
- <manual_measures
- id="3"
- created_at="[null]"
- created_at_ms="[null]"
- updated_at="[null]"
- updated_at_ms="[null]"
- />
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/before.xml
deleted file mode 100644
index 73c4e0e8473..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/before.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<dataset>
- <!-- new migration -->
- <snapshots
- id="1"
- project_id="1"
- created_at="2014-09-25"
- created_at_ms="[null]"
- build_date="2014-09-25"
- build_date_ms="[null]"
- period1_date="2014-09-25"
- period1_date_ms="[null]"
- period2_date="2014-09-25"
- period2_date_ms="[null]"
- period3_date="2014-09-25"
- period3_date_ms="[null]"
- period4_date="2014-09-25"
- period4_date_ms="[null]"
- period5_date="2014-09-25"
- period5_date_ms="[null]"
- />
-
- <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
- <snapshots
- id="2"
- project_id="1"
- created_at="2014-09-25"
- created_at_ms="1500000000"
- build_date="2014-09-25"
- build_date_ms="1500000000"
- period1_date="2014-09-25"
- period1_date_ms="1500000000"
- period2_date="2014-09-25"
- period2_date_ms="1500000000"
- period3_date="2014-09-25"
- period3_date_ms="1500000000"
- period4_date="2014-09-25"
- period4_date_ms="1500000000"
- period5_date="2014-09-25"
- period5_date_ms="1500000000"
- />
-
- <!-- NULL dates -->
- <snapshots
- id="3"
- project_id="1"
- created_at="[null]"
- created_at_ms="[null]"
- build_date="[null]"
- build_date_ms="[null]"
- period1_date="[null]"
- period1_date_ms="[null]"
- period2_date="[null]"
- period2_date_ms="[null]"
- period3_date="[null]"
- period3_date_ms="[null]"
- period4_date="[null]"
- period4_date_ms="[null]"
- period5_date="[null]"
- period5_date_ms="[null]"
- />
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/before.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/before.xml
deleted file mode 100644
index 27a64351c01..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/before.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<dataset>
-
- <users id="1" login="user1" name="User1" active="[true]"
- created_at="2014-05-12"
- updated_at="2014-05-13"
- CREATED_AT_MS="[null]"
- UPDATED_AT_MS="[null]"
- />
-
- <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
- <users id="2" login="user2" name="User2" active="[true]"
- created_at="2014-05-12"
- updated_at="2014-05-13"
- CREATED_AT_MS="1500000000000"
- UPDATED_AT_MS="1500000000000"
- />
-
- <!-- NULL dates -->
- <users id="3" login="user3" name="User3" active="[true]"
- created_at="[null]"
- updated_at="[null]"
- CREATED_AT_MS="[null]"
- UPDATED_AT_MS="[null]"
- />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml
deleted file mode 100644
index a8697260c07..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<dataset>
-
- <!-- Not updated, no concerned field -->
- <issue_filters
- id="1"
- name="No concerned field"
- user_login="stephane"
- shared="[true]"
- description="no not touch"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <!-- Not updated, projectUuids is left as is -->
- <issue_filters
- id="2"
- name="Has projects"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|asc=true|projectUuids=ABC"
- created_at="2013-06-10"
- updated_at="2013-06-10 00:00:00.0" />
-
- <!-- componentUuids replaced by fileUuids -->
- <issue_filters
- id="3"
- name="Has components"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="fileUuids=ABC|statuses=OPEN|sort=SEVERITY|asc=true"
- created_at="2013-06-10"
- updated_at="2014-10-29 00:00:00.0" />
-
- <!-- componentRootUuids replaced by moduleUuids -->
- <issue_filters
- id="4"
- name="Has componentRoots"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|asc=true|moduleUuids=ABC"
- created_at="2013-06-10"
- updated_at="2014-10-29 00:00:00.0" />
-
- <!-- componentRootUuids replaced by moduleUuids (in the middle of the string) -->
- <issue_filters
- id="5"
- name="Has projects"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|moduleUuids=ABC|asc=true"
- created_at="2013-06-10"
- updated_at="2014-10-29 00:00:00.0" />
-
- <!-- componentUuidss replaced by fileUuids, componentRootUuids replaced by moduleUuids -->
- <issue_filters
- id="6"
- name="Has all parameters"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|fileUuids=BCD|moduleUuids=ABC|projectUuids=CDE|asc=true"
- created_at="2013-06-10"
- updated_at="2014-10-29 00:00:00.0" />
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml
deleted file mode 100644
index e88294d599c..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<dataset>
-
- <!-- Not updated, no concerned field -->
- <issue_filters
- id="1"
- name="No concerned field"
- user_login="stephane"
- shared="[true]"
- description="no not touch"
- data="projectUuids=ABCD"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <!-- Not updated, projectUuids is left as is -->
- <issue_filters
- id="2"
- name="Has projects"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|asc=true|projectUuids=ABC"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <!-- componentUuids replaced by fileUuids -->
- <issue_filters
- id="3"
- name="Has components"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="componentUuids=ABC|statuses=OPEN|sort=SEVERITY|asc=true"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <!-- componentRootUuids replaced by moduleUuids -->
- <issue_filters
- id="4"
- name="Has componentRoots"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|asc=true|componentRootUuids=ABC"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <!-- componentRootUuids replaced by moduleUuids (in the middle of the string) -->
- <issue_filters
- id="5"
- name="Has projects"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|componentRootUuids=ABC|asc=true"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
- <!-- componentUuidss replaced by fileUuids, componentRootUuids replaced by moduleUuids -->
- <issue_filters
- id="6"
- name="Has all parameters"
- user_login="michael"
- shared="[false]"
- description="to be updated"
- data="statuses=OPEN|sort=SEVERITY|componentUuids=BCD|componentRootUuids=ABC|projectUuids=CDE|asc=true"
- created_at="2013-06-10"
- updated_at="2013-06-10" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate-result.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate-result.xml
deleted file mode 100644
index ada195e5574..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate-result.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<dataset>
-
- <events id="1" name="1.0" resource_id="1" component_uuid="ABCD" snapshot_id="1000" category="Version" event_date="1225630680000" created_at="1225630680000" description="" event_data="[null]"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate.xml b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate.xml
deleted file mode 100644
index 402bb36e61d..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<dataset>
-
- <file_sources id="1" project_uuid="project-1" file_uuid="file-1" data_type="[null]" created_at="123456789" updated_at="456456456" />
- <file_sources id="2" project_uuid="project-2" file_uuid="file-2" data_type="SOURCE" created_at="123456789" updated_at="456456456" />
- <file_sources id="3" project_uuid="project-3" file_uuid="file-3" data_type="[null]" created_at="123456789" updated_at="456456456" />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset.xml
deleted file mode 100644
index 432fb122d56..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<dataset>
-
- <!-- Constant/issue with coefficient -> Update rule to Constant/issue with offset -->
- <rules id="1" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]"
- updated_at="2014-02-19"
- tags="[null]" system_tags="[null]"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
- />
-
- <!-- Constant/issue with coefficient and offset -> Update rule to Constant/issue with only offset -->
- <rules id="2" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]"
- updated_at="2014-02-19"
- tags="[null]" system_tags="[null]"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
- />
-
- <!-- Constant/issue with coefficient but having same value as default -> No update -->
- <rules id="3" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="CONSTANT_ISSUE"
- remediation_coeff="[null]" default_remediation_coeff="[null]"
- remediation_offset="[null]" default_remediation_offset="5min"
- updated_at="2014-02-19"
- tags="[null]" system_tags="[null]"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
- />
-
- <!-- Requirements of rule 1 -->
- <characteristics id="1" parent_id="10" rule_id="1"
- function_key="constant_issue" factor_value="20.0" factor_unit="mn" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <!-- Requirements of rule 2 -->
- <characteristics id="2" parent_id="10" rule_id="2"
- function_key="constant_issue" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <!-- Requirements of rule 3 -->
- <characteristics id="3" parent_id="10" rule_id="3"
- function_key="constant_issue" factor_value="5.0" factor_unit="mn" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset_result.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset_result.xml
deleted file mode 100644
index 28ae2d1a96d..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/convert_constant_issue_with_coeff_to_constant_issue_with_offset_result.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<dataset>
-
- <!-- Constant/issue with coefficient -> Update rule to Constant/issue with offset -->
- <rules id="1" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="10" default_characteristic_id="10" description_format="HTML"
- remediation_function="CONSTANT_ISSUE" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="20min" default_remediation_offset="[null]"
- updated_at="2014-03-13"
- tags="[null]" system_tags="[null]"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
- />
-
- <!-- Constant/issue with coefficient and offset -> Update rule to Constant/issue with only offset -->
- <rules id="2" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
- characteristic_id="10" default_characteristic_id="10" description_format="HTML"
- remediation_function="CONSTANT_ISSUE" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="30min" default_remediation_offset="[null]"
- updated_at="2014-03-13"
- tags="[null]" system_tags="[null]"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
- />
-
- <!-- Constant/issue with coefficient but having same value as default -> No update -->
- <rules id="3" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="CONSTANT_ISSUE"
- remediation_coeff="[null]" default_remediation_coeff="[null]"
- remediation_offset="[null]" default_remediation_offset="5min"
- updated_at="2014-02-19"
- tags="[null]" system_tags="[null]"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"
- />
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules.xml
deleted file mode 100644
index c7bcef60407..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<dataset>
-
- <!-- Rule not linked to a requirement -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="UselessImportCheck" plugin_name="squid" name="UselessImportCheck" description="Useless imports should be removed" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to a disabled requirement -> Update rule to disable characteristic -->
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Removed rule linked to a disabled requirement -> Do nothing -->
- <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement="[null]" with same value of debt -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5min"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should be replaced by 0d)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- No requirement for rule 1 -->
-
- <!-- Requirements of rule 2 -->
- <characteristics id="1" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="2" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 3 -->
- <characteristics id="3" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="4" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 4 -->
- <characteristics id="5" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="5.0" factor_unit="mn" offset_value="9.8" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="6" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 5 -->
- <characteristics id="7" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="8" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 6 -->
- <characteristics id="9" parent_id="10" rule_id="6"
- function_key="constant_issue" factor_value="0.0" factor_unit="d" offset_value="15.0" offset_unit="mn" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 7 -->
- <characteristics id="10" parent_id="10" rule_id="7"
- function_key="linear" factor_value="0.0" factor_unit="mn" offset_value="0.0" offset_unit="min" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 8 -->
- <characteristics id="11" parent_id="10" rule_id="8"
- function_key="linear_offset" factor_value="5.0" factor_unit="d" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 9 -->
- <characteristics id="12" parent_id="10" rule_id="9"
- function_key="linear" factor_value="0.0" factor_unit="d" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules_result.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules_result.xml
deleted file mode 100644
index 6609b875291..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/copy_requirements_from_characteristics_to_rules_result.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<dataset>
-
- <!-- Rule not linked to a requirement -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="UselessImportCheck" plugin_name="squid" name="UselessImportCheck" description="Useless imports should be removed" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to a disabled requirements -> Update rule to disable characteristic -->
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="-1" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-03-13"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Removed rule linked to a disabled requirement -> Do nothing -->
- <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement, with same value of debt -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5min"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement, with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="10" default_characteristic_id="20" description_format="HTML"
- remediation_function="LINEAR_OFFSET" default_remediation_function="LINEAR"
- remediation_coeff="20min" default_remediation_coeff="5d"
- remediation_offset="30h" default_remediation_offset="[null]" updated_at="2014-03-13"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null), with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
- characteristic_id="10" default_characteristic_id="20" description_format="HTML"
- remediation_function="CONSTANT_ISSUE" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="15min" default_remediation_offset="[null]" updated_at="2014-03-13"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null), with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
- characteristic_id="10" default_characteristic_id="20" description_format="HTML"
- remediation_function="LINEAR" default_remediation_function="LINEAR"
- remediation_coeff="0min" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-03-13"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should keep 0h), with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
- characteristic_id="10" default_characteristic_id="20" description_format="HTML"
- remediation_function="LINEAR_OFFSET" default_remediation_function="LINEAR"
- remediation_coeff="5d" default_remediation_coeff="5d"
- remediation_offset="0h" default_remediation_offset="[null" updated_at="2014-03-13"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d), with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
- characteristic_id="10" default_characteristic_id="20" description_format="HTML"
- remediation_function="LINEAR" default_remediation_function="LINEAR"
- remediation_coeff="0d" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-03-13"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <loaded_templates id="1" kee="CopyRequirementsFromCharacteristicsToRules" template_type="ONE_SHOT_TASK"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed.xml
deleted file mode 100644
index 88d70a256dc..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<dataset>
-
- <!-- Loaded template already existing, nothing should be done -->
- <loaded_templates id="1" kee="CopyRequirementsFromCharacteristicsToRules" template_type="ONE_SHOT_TASK"/>
-
- <!-- Rule not linked to a requirement -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="UselessImportCheck" plugin_name="squid" name="UselessImportCheck" description="Useless imports should be removed" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to a disabled requirement -> Update rule to disable characteristic -->
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Removed rule linked to a disabled requirement -> Do nothing -->
- <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement="[null]" with same value of debt -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5min"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should be replaced by 0d)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- No requirement for rule 1 -->
-
- <!-- Requirements of rule 2 -->
- <characteristics id="1" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="2" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 3 -->
- <characteristics id="3" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="4" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 4 -->
- <characteristics id="5" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="5.0" factor_unit="mn" offset_value="9.8" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="6" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 5 -->
- <characteristics id="7" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="8" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 6 -->
- <characteristics id="9" parent_id="10" rule_id="6"
- function_key="constant_issue" factor_value="0.0" factor_unit="d" offset_value="15.0" offset_unit="mn" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 7 -->
- <characteristics id="10" parent_id="10" rule_id="7"
- function_key="linear" factor_value="0.0" factor_unit="mn" offset_value="0.0" offset_unit="min" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 8 -->
- <characteristics id="11" parent_id="10" rule_id="8"
- function_key="linear_offset" factor_value="5.0" factor_unit="d" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 9 -->
- <characteristics id="12" parent_id="10" rule_id="9"
- function_key="linear" factor_value="0.0" factor_unit="d" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed_result.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed_result.xml
deleted file mode 100644
index 2a331302155..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/do_nothing_when_already_executed_result.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<dataset>
-
- <!-- Rule not linked to a requirement -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="1" plugin_rule_key="UselessImportCheck" plugin_name="squid" name="UselessImportCheck" description="Useless imports should be removed" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]"
- is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to a disabled requirement -> Update rule to disable characteristic -->
- <rules tags="[null]" system_tags="[null]" id="2" plugin_rule_key="LeftCurlyBraceStartLineCheck" plugin_name="squid" name="LeftCurlyBraceStartLineCheck" description="Left curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Removed rule linked to a disabled requirement -> Do nothing -->
- <rules tags="[null]" system_tags="[null]" id="3" plugin_rule_key="CallToFileDeleteOnExitMethod" plugin_name="squid" name="CallToFileDeleteOnExitMethod" description="CallToFileDeleteOnExitMethod" status="REMOVED"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement="[null]" with same value of debt -> Nothing to do -->
- <rules tags="[null]" system_tags="[null]" id="4" plugin_rule_key="ObjectFinalizeOverridenCallsSuperFinalizeCheck" plugin_name="squid" name="ObjectFinalizeOverridenCallsSuperFinalizeCheck" description="super.finalize() should be called at the end of Object.finalize() implementations" status="READY"
- characteristic_id="[null]" default_characteristic_id="10" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR_OFFSET"
- remediation_coeff="[null]" default_remediation_coeff="5min"
- remediation_offset="[null]" default_remediation_offset="10h" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="5" plugin_rule_key="RightCurlyBraceStartLineCheck" plugin_name="squid" name="RightCurlyBraceStartLineCheck" description="Right curly braces should be located at the beginning of lines of code" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Constant per issue function (with a coefficient of 0d -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="6" plugin_rule_key="HiddenFieldCheck" plugin_name="squid" name="HiddenFieldCheck" description="HiddenFieldCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0min -> to be replaced by null)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="7" plugin_rule_key="ForLoopCounterChangedCheck" plugin_name="squid" name="ForLoopCounterChangedCheck" description="ForLoopCounterChangedCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear with offset function (with a offset of 0h -> should be replaced by 0d)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="8" plugin_rule_key="ClassVariableVisibilityCheck" plugin_name="squid" name="ClassVariableVisibilityCheck" description="ClassVariableVisibilityCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- Rule linked to one enable requirement on Linear function (with a coefficient of 0d -> should keep 0d)="[null]" with different value of debt -> Update rule -->
- <rules tags="[null]" system_tags="[null]" id="9" plugin_rule_key="SwitchLastCaseIsDefaultCheck" plugin_name="squid" name="SwitchLastCaseIsDefaultCheck" description="SwitchLastCaseIsDefaultCheck" status="READY"
- characteristic_id="[null]" default_characteristic_id="20" description_format="HTML"
- remediation_function="[null]" default_remediation_function="LINEAR"
- remediation_coeff="[null]" default_remediation_coeff="5d"
- remediation_offset="[null]" default_remediation_offset="[null]" updated_at="2014-02-19"
- NOTE_CREATED_AT="[null]" NOTE_DATA="[null]" NOTE_UPDATED_AT="[null]" NOTE_USER_LOGIN="[null]" template_id="[null]" PLUGIN_CONFIG_KEY="[null]" PRIORITY="[null]" is_template="[false]" created_at="[null]" language="[null]" effort_to_fix_description="[null]"/>
-
- <!-- No requirement for rule 1 -->
-
- <!-- Requirements of rule 2 -->
- <characteristics id="1" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="2" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 3 -->
- <characteristics id="3" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="4" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 4 -->
- <characteristics id="5" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="5.0" factor_unit="mn" offset_value="9.8" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="6" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 5 -->
- <characteristics id="7" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <characteristics id="8" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 6 -->
- <characteristics id="9" parent_id="10" rule_id="6"
- function_key="constant_issue" factor_value="0.0" factor_unit="d" offset_value="15.0" offset_unit="mn" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 7 -->
- <characteristics id="10" parent_id="10" rule_id="7"
- function_key="linear" factor_value="0.0" factor_unit="mn" offset_value="0.0" offset_unit="min" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 8 -->
- <characteristics id="11" parent_id="10" rule_id="8"
- function_key="linear_offset" factor_value="5.0" factor_unit="d" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
- <!-- Requirements of rule 9 -->
- <characteristics id="12" parent_id="10" rule_id="9"
- function_key="linear" factor_value="0.0" factor_unit="d" offset_value="0.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"/>
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics.xml
deleted file mode 100644
index 687155ae02b..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<dataset>
-
- <!-- Requirements to be updated -->
- <characteristics id="1" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="2" parent_id="10" rule_id="2"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22"/>
-
- <characteristics id="3" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="4" parent_id="10" rule_id="3"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22"/>
-
- <characteristics id="5" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="5.0" factor_unit="mn" offset_value="9.8" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="6" parent_id="10" rule_id="4"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22"/>
-
- <characteristics id="7" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="8" parent_id="10" rule_id="5"
- function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"
- created_at="2013-11-20" updated_at="2013-11-22"/>
-
- <!-- Characteristics not to be updated -->
-
- <characteristics id="10" parent_id="10" rule_id="[null]"
- function_key="[null]" factor_value="[null]" factor_unit="[null]" offset_value="[null]" offset_unit="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]"/>
-
- <characteristics id="11" parent_id="10" rule_id="[null]"
- function_key="[null]" factor_value="[null]" factor_unit="[null]" offset_value="[null]" offset_unit="[null]" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]"/>
-
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics_result.xml b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics_result.xml
deleted file mode 100644
index aa171ba18ca..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/remove_requirements_data_from_characteristics_result.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<!--
- ~ SonarQube, open source software quality management tool.
- ~ Copyright (C) 2008-2014 SonarSource
- ~ mailto:contact AT sonarsource DOT com
- ~
- ~ SonarQube is free software; you can redistribute it and/or
- ~ modify it under the terms of the GNU Lesser General Public
- ~ License as published by the Free Software Foundation; either
- ~ version 3 of the License, or (at your option) any later version.
- ~
- ~ SonarQube is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- ~ Lesser General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this program; if not, write to the Free Software Foundation,
- ~ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- -->
-
-<dataset>
-
- <!-- Requirements to be updated -->
- <!--<characteristics id="1" parent_id="10" rule_id="2"-->
- <!--function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"-->
- <!--created_at="2013-11-20" updated_at="[null]"/>-->
-
- <!--<characteristics id="2" parent_id="10" rule_id="2"-->
- <!--function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"-->
- <!--created_at="2013-11-20" updated_at="2013-11-22"/>-->
-
- <!--<characteristics id="3" parent_id="10" rule_id="3"-->
- <!--function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[false]"-->
- <!--created_at="2013-11-20" updated_at="[null]"/>-->
-
- <!--<characteristics id="4" parent_id="10" rule_id="3"-->
- <!--function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"-->
- <!--created_at="2013-11-20" updated_at="2013-11-22"/>-->
-
- <!--<characteristics id="5" parent_id="10" rule_id="4"-->
- <!--function_key="linear_offset" factor_value="5.0" factor_unit="mn" offset_value="9.8" offset_unit="h" enabled="[true]"-->
- <!--created_at="2013-11-20" updated_at="[null]"/>-->
-
- <!--<characteristics id="6" parent_id="10" rule_id="4"-->
- <!--function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"-->
- <!--created_at="2013-11-20" updated_at="2013-11-22"/>-->
-
- <!--<characteristics id="7" parent_id="10" rule_id="5"-->
- <!--function_key="linear_offset" factor_value="20.0" factor_unit="mn" offset_value="30.0" offset_unit="h" enabled="[true]"-->
- <!--created_at="2013-11-20" updated_at="[null]"/>-->
-
- <!--<characteristics id="8" parent_id="10" rule_id="5"-->
- <!--function_key="linear_offset" factor_value="30.0" factor_unit="mn" offset_value="20.0" offset_unit="h" enabled="[false]"-->
- <!--created_at="2013-11-20" updated_at="2013-11-22"/>-->
-
- <!-- Characteristics not to be updated -->
-
- <characteristics id="10" parent_id="10" rule_id="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"
- function_key="[null]" factor_value="[null]" factor_unit="[null]" offset_value="[null]" offset_unit="[null]" enabled="[true]"
- created_at="2013-11-20" updated_at="[null]" />
-
- <characteristics id="11" parent_id="10" rule_id="[null]" ROOT_ID="[null]" KEE="[null]" name="[null]" characteristic_order="[null]"
- function_key="[null]" factor_value="[null]" factor_unit="[null]" offset_value="[null]" offset_unit="[null]" enabled="[false]"
- created_at="2013-11-20" updated_at="[null]"/>
-
-
-</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/schema.sql b/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/schema.sql
deleted file mode 100644
index 7b4b9075ddc..00000000000
--- a/server/sonar-server/src/test/resources/org/sonar/server/startup/CopyRequirementsFromCharacteristicsToRulesTest/schema.sql
+++ /dev/null
@@ -1,33 +0,0 @@
-CREATE TABLE "RULES" (
- "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
- "PLUGIN_RULE_KEY" VARCHAR(200) NOT NULL,
- "PLUGIN_NAME" VARCHAR(255) NOT NULL,
- "DESCRIPTION" VARCHAR(16777215),
- "NAME" VARCHAR(200),
- "STATUS" VARCHAR(40),
- "CHARACTERISTIC_ID" INTEGER,
- "DEFAULT_CHARACTERISTIC_ID" INTEGER,
- "REMEDIATION_FUNCTION" VARCHAR(20),
- "DEFAULT_REMEDIATION_FUNCTION" VARCHAR(20),
- "REMEDIATION_COEFF" VARCHAR(20),
- "DEFAULT_REMEDIATION_COEFF" VARCHAR(20),
- "REMEDIATION_OFFSET" VARCHAR(20),
- "DEFAULT_REMEDIATION_OFFSET" VARCHAR(20),
- "TAGS" VARCHAR(4000),
- "SYSTEM_TAGS" VARCHAR(4000),
- "UPDATED_AT" TIMESTAMP
-);
-
-CREATE TABLE "CHARACTERISTICS" (
- "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
- "PARENT_ID" INTEGER,
- "RULE_ID" INTEGER,
- "FUNCTION_KEY" VARCHAR(100),
- "FACTOR_VALUE" DOUBLE,
- "FACTOR_UNIT" VARCHAR(100),
- "OFFSET_VALUE" DOUBLE,
- "OFFSET_UNIT" VARCHAR(100),
- "ENABLED" BOOLEAN,
- "CREATED_AT" TIMESTAMP,
- "UPDATED_AT" TIMESTAMP
-);
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb
deleted file mode 100644
index ca457552193..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/054_create_alerts_table.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-class CreateAlertsTable < ActiveRecord::Migration
-
- def self.up
- create_table :alerts do |t|
- t.column :profile_id, :integer
- t.column :metric_id, :integer
- t.column :operator, :string, :limit => 3, :null => true
- t.column :value_error, :string, :limit => 64, :null => true
- t.column :value_warning, :string, :limit => 64, :null => true
- t.column 'period', :integer, :null => true
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/410_add_oracle_id_triggers.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/410_add_oracle_id_triggers.rb
index 0bb601b32ed..9e67eb77e49 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/410_add_oracle_id_triggers.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/410_add_oracle_id_triggers.rb
@@ -32,7 +32,6 @@ class AddOracleIdTriggers < ActiveRecord::Migration
create_id_trigger('active_rule_param_changes')
create_id_trigger('active_rule_parameters')
create_id_trigger('active_rules')
- create_id_trigger('alerts')
create_id_trigger('authors')
create_id_trigger('characteristic_properties')
create_id_trigger('characteristics')
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/432_fix_oracle_trigger_names.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/432_fix_oracle_trigger_names.rb
index 510ad57c7c1..a400e0457b7 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/432_fix_oracle_trigger_names.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/432_fix_oracle_trigger_names.rb
@@ -36,7 +36,6 @@ class FixOracleTriggerNames < ActiveRecord::Migration
drop_trigger_quietly('active_rule_notes_id_trg')
drop_trigger_quietly('active_rule_parameters_id_trg')
drop_trigger_quietly('active_rules_id_trg')
- drop_trigger_quietly('alerts_id_trg')
drop_trigger_quietly('authors_id_trg')
drop_trigger_quietly('characteristics_id_trg')
drop_trigger_quietly('dashboards_id_trg')
@@ -80,7 +79,6 @@ class FixOracleTriggerNames < ActiveRecord::Migration
create_id_trigger('active_rule_param_changes')
create_id_trigger('active_rule_parameters')
create_id_trigger('active_rules')
- create_id_trigger('alerts')
create_id_trigger('authors')
create_id_trigger('characteristic_properties')
create_id_trigger('characteristics')
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/489_add_rule_tags.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/489_add_rule_tags.rb
deleted file mode 100644
index 21b57b17428..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/489_add_rule_tags.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# SonarQube 4.2
-#
-class AddRuleTags < ActiveRecord::Migration
-
- def self.up
- create_table :rule_tags do |t|
- t.column :tag, :string, :null => true, :limit => 100
- end
- create_table :rules_rule_tags do |t|
- t.column :rule_id, :integer, :null => false
- t.column :rule_tag_id, :integer, :null => false
- t.column :tag_type, :string, :null => true, :limit => 20
- end
- add_index 'rules_rule_tags', ['rule_id', 'rule_tag_id'], :unique => true, :name => 'uniq_rule_tags'
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/522_drop_alerts.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/522_drop_alerts.rb
deleted file mode 100644
index 81fbbf63ee3..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/522_drop_alerts.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# SonarQube 4.3
-# SONAR-5097
-#
-class DropAlerts < ActiveRecord::Migration
-
- def self.up
- drop_table(:alerts)
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/534_update_measure_filters_on_language.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/534_update_measure_filters_on_language.rb
deleted file mode 100644
index 1284d6345c5..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/534_update_measure_filters_on_language.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# SonarQube 4.4
-# SONAR-5221
-#
-class UpdateMeasureFiltersOnLanguage < ActiveRecord::Migration
-
- class MeasureFilter < ActiveRecord::Base
- end
-
- def self.up
- MeasureFilter.reset_column_information
- MeasureFilter.all(:conditions => "data LIKE '%language%'").each do |filter|
- # Remove sort on language
- filter.data = filter.data.sub('sort=language', '')
-
- filter.data.scan(/cols=((.+?)(\||\z))?/) do |find|
- cols_data = find[0]
- # Remove display of language column
- filter.data = filter.data.sub(cols_data, cols_data.gsub(/language/, ''))
- end
- filter.save!
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/537_drop_rule_tags_tables.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/537_drop_rule_tags_tables.rb
deleted file mode 100644
index 6019912e646..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/537_drop_rule_tags_tables.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# SonarQube 4.4
-# SONAR-5007
-#
-class DropRuleTagsTables < ActiveRecord::Migration
-
- class Rule < ActiveRecord::Base
- end
-
- class Tag < ActiveRecord::Base
- set_table_name 'rule_tags'
- end
-
- class RuleTag < ActiveRecord::Base
- set_table_name 'rules_rule_tags'
- end
-
- def self.up
- # load tags
- tags_by_id={}
- Tag.find(:all).inject(tags_by_id) do |h, tag|
- h[tag.id]=tag.tag
- h
- end
-
- # load associations between rules and tags
- rule_tags_by_rule_id={}
- RuleTag.find(:all).inject(rule_tags_by_rule_id) do |h, rule_tag|
- h[rule_tag.rule_id]||=[]
- h[rule_tag.rule_id]<<rule_tag
- h
- end
-
- # move tags to RULES.TAGS and RULES.SYSTEM_TAGS (see migration 533)
- rule_tags_by_rule_id.each do |rule_id, rule_tags|
- rule=Rule.find(rule_id)
- if rule
- system_tags=[]
- user_tags=[]
- rule_tags.each do |rule_tag|
- if rule_tag.tag_type=='SYSTEM'
- system_tags<<tags_by_id[rule_tag.rule_tag_id]
- else
- user_tags<<tags_by_id[rule_tag.rule_tag_id]
- end
- end
- rule.tags=user_tags.join(',')
- rule.system_tags=system_tags.join(',')
- rule.save!
- end
- end
-
- drop_table(:rules_rule_tags)
- drop_table(:rule_tags)
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb
index eb41a4ff19d..43eafcdbdce 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb
@@ -25,6 +25,6 @@
class AddMissingCustomRuleParameters < ActiveRecord::Migration
def self.up
- execute_java_migration 'org.sonar.server.db.migrations.v451.AddMissingCustomRuleParametersMigrationStep'
+ execute_java_migration 'org.sonar.db.version.v451.AddMissingCustomRuleParametersMigrationStep'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/604_delete_unescaped_activities.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/604_delete_unescaped_activities.rb
index 6fe1d07472c..7ac56c08622 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/604_delete_unescaped_activities.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/604_delete_unescaped_activities.rb
@@ -25,6 +25,6 @@
class DeleteUnescapedActivities < ActiveRecord::Migration
def self.up
- execute_java_migration 'org.sonar.server.db.migrations.v451.DeleteUnescapedActivities'
+ execute_java_migration 'org.sonar.db.version.v451.DeleteUnescapedActivities'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/705_populate_projects_uuid_columns.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/705_populate_projects_uuid_columns.rb
index 6cc1aba4d0b..f58570bd8ce 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/705_populate_projects_uuid_columns.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/705_populate_projects_uuid_columns.rb
@@ -25,7 +25,7 @@
class PopulateProjectsUuidColumns < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.PopulateProjectsUuidColumnsMigrationStep')
+ execute_java_migration('org.sonar.db.version.v50.PopulateProjectsUuidColumnsMigrationStep')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/710_replace_issue_filters_project_key_by_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/710_replace_issue_filters_project_key_by_uuid.rb
index e10a9a62a83..82a62bdbddb 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/710_replace_issue_filters_project_key_by_uuid.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/710_replace_issue_filters_project_key_by_uuid.rb
@@ -24,7 +24,7 @@
#
class ReplaceIssueFiltersProjectKeyByUuid < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.ReplaceIssueFiltersProjectKeyByUuid')
+ execute_java_migration('org.sonar.db.version.v50.ReplaceIssueFiltersProjectKeyByUuid')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/712_feed_snapshot_sources_updated_at.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/712_feed_snapshot_sources_updated_at.rb
index 86891f5c701..782df91a8a0 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/712_feed_snapshot_sources_updated_at.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/712_feed_snapshot_sources_updated_at.rb
@@ -24,6 +24,6 @@
#
class FeedSnapshotSourcesUpdatedAt < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.FeedSnapshotSourcesUpdatedAt')
+ execute_java_migration('org.sonar.db.version.v50.FeedSnapshotSourcesUpdatedAt')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/714_feed_file_sources.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/714_feed_file_sources.rb
index 99f78b28ac0..453ebd7ee7f 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/714_feed_file_sources.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/714_feed_file_sources.rb
@@ -24,7 +24,7 @@
class FeedFileSources < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.FeedFileSources')
+ execute_java_migration('org.sonar.db.version.v50.FeedFileSources')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/716_insert_projects_authorization_updated_at.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/716_insert_projects_authorization_updated_at.rb
index aec34e16e5f..6ad7b6e95e1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/716_insert_projects_authorization_updated_at.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/716_insert_projects_authorization_updated_at.rb
@@ -25,7 +25,7 @@
class InsertProjectsAuthorizationUpdatedAt < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.InsertProjectsAuthorizationUpdatedAtMigrationStep')
+ execute_java_migration('org.sonar.db.version.v50.InsertProjectsAuthorizationUpdatedAtMigrationStep')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/719_feed_issue_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/719_feed_issue_long_dates.rb
index fbabcaa7633..25298df5a33 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/719_feed_issue_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/719_feed_issue_long_dates.rb
@@ -24,7 +24,7 @@
class FeedIssueLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.FeedIssueLongDates')
+ execute_java_migration('org.sonar.db.version.v50.FeedIssueLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/721_remove_sort_field_from_issue_filters.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/721_remove_sort_field_from_issue_filters.rb
index 1958f9ef8de..2ef0a584c58 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/721_remove_sort_field_from_issue_filters.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/721_remove_sort_field_from_issue_filters.rb
@@ -24,7 +24,7 @@
class RemoveSortFieldFromIssueFilters < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v50.RemoveSortFieldFromIssueFiltersMigrationStep')
+ execute_java_migration('org.sonar.db.version.v50.RemoveSortFieldFromIssueFiltersMigrationStep')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/750_add_issues_columns.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/750_add_issues_columns.rb
index ff2f7786ad7..d157a9e1f52 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/750_add_issues_columns.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/750_add_issues_columns.rb
@@ -25,7 +25,7 @@
class AddIssuesColumns < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.AddIssuesColumns')
+ execute_java_migration('org.sonar.db.version.v51.AddIssuesColumns')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/753_feed_users_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/753_feed_users_long_dates.rb
index 1a83d496f41..4bd01ac5d20 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/753_feed_users_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/753_feed_users_long_dates.rb
@@ -25,7 +25,7 @@
class FeedUsersLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedUsersLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedUsersLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/758_rename_component_related_params_in_issue_filters.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/758_rename_component_related_params_in_issue_filters.rb
index ba07ecf669a..1fdb448798a 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/758_rename_component_related_params_in_issue_filters.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/758_rename_component_related_params_in_issue_filters.rb
@@ -21,7 +21,7 @@
class RenameComponentRelatedParamsInIssueFilters < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.RenameComponentRelatedParamsInIssueFilters')
+ execute_java_migration('org.sonar.db.version.v51.RenameComponentRelatedParamsInIssueFilters')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/759_copy_scm_accounts_from_authors_to_users.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/759_copy_scm_accounts_from_authors_to_users.rb
index 33bc94ad18e..6c44c6bb878 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/759_copy_scm_accounts_from_authors_to_users.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/759_copy_scm_accounts_from_authors_to_users.rb
@@ -25,7 +25,7 @@
class CopyScmAccountsFromAuthorsToUsers < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.CopyScmAccountsFromAuthorsToUsers')
+ execute_java_migration('org.sonar.db.version.v51.CopyScmAccountsFromAuthorsToUsers')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/761_feed_issue_changes_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/761_feed_issue_changes_long_dates.rb
index 2d6d3398d2b..a84d9ff62a6 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/761_feed_issue_changes_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/761_feed_issue_changes_long_dates.rb
@@ -24,7 +24,7 @@
class FeedIssueChangesLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedIssueChangesLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedIssueChangesLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/764_feed_analysis_reports_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/764_feed_analysis_reports_long_dates.rb
index dc59f53554f..59367a73a7f 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/764_feed_analysis_reports_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/764_feed_analysis_reports_long_dates.rb
@@ -24,7 +24,7 @@
class FeedAnalysisReportsLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedAnalysisReportsLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedAnalysisReportsLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/770_feed_issue_tags.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/770_feed_issue_tags.rb
index 1d897a52bea..c81de87e6e1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/770_feed_issue_tags.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/770_feed_issue_tags.rb
@@ -25,7 +25,7 @@
class FeedIssueTags < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedIssueTags')
+ execute_java_migration('org.sonar.db.version.v51.FeedIssueTags')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/772_feed_issue_component_uuids.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/772_feed_issue_component_uuids.rb
index 173b6a16898..933cae62cd0 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/772_feed_issue_component_uuids.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/772_feed_issue_component_uuids.rb
@@ -24,6 +24,6 @@
class FeedIssueComponentUuids < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedIssueComponentUuids')
+ execute_java_migration('org.sonar.db.version.v51.FeedIssueComponentUuids')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_feed_issues_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_feed_issues_long_dates.rb
index ddbc6da29af..fddc90d3046 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_feed_issues_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/773_feed_issues_long_dates.rb
@@ -24,7 +24,7 @@
class FeedIssuesLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedIssuesLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedIssuesLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/776_feed_snapshots_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/776_feed_snapshots_long_dates.rb
index 42e272f7e42..c76a70d44dc 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/776_feed_snapshots_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/776_feed_snapshots_long_dates.rb
@@ -23,7 +23,7 @@
#
class FeedSnapshotsLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedSnapshotsLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedSnapshotsLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/779_drop_issues_columns.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/779_drop_issues_columns.rb
index c1d92bb722a..4422c651429 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/779_drop_issues_columns.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/779_drop_issues_columns.rb
@@ -24,6 +24,6 @@
class DropIssuesColumns < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.DropIssuesColumns')
+ execute_java_migration('org.sonar.db.version.v51.DropIssuesColumns')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/782_feed_file_sources_binary_data.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/782_feed_file_sources_binary_data.rb
index dea83cfc92b..f8078b51efb 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/782_feed_file_sources_binary_data.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/782_feed_file_sources_binary_data.rb
@@ -24,6 +24,6 @@
class FeedFileSourcesBinaryData < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedFileSourcesBinaryData')
+ execute_java_migration('org.sonar.db.version.v51.FeedFileSourcesBinaryData')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_manual_measures_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_manual_measures_long_dates.rb
index 23e42b928da..53dc75ac8e3 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_manual_measures_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_manual_measures_long_dates.rb
@@ -23,7 +23,7 @@
#
class FeedManualMeasuresLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedManualMeasuresLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedManualMeasuresLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb
index b25be54b77b..4d8e895c561 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb
@@ -26,6 +26,6 @@
class UpdateProjectsModuleUuidPath < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath')
+ execute_java_migration('org.sonar.db.version.v51.UpdateProjectsModuleUuidPath')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/792_feed_events_long_dates.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/792_feed_events_long_dates.rb
index b058d46e559..a2771d83f17 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/792_feed_events_long_dates.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/792_feed_events_long_dates.rb
@@ -23,7 +23,7 @@
#
class FeedEventsLongDates < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v51.FeedEventsLongDates')
+ execute_java_migration('org.sonar.db.version.v51.FeedEventsLongDates')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/794_add_characteristic_usability_and_sub_characteristics_compliance.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/794_add_characteristic_usability_and_sub_characteristics_compliance.rb
index 3637819ad25..67f2d9d884e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/794_add_characteristic_usability_and_sub_characteristics_compliance.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/794_add_characteristic_usability_and_sub_characteristics_compliance.rb
@@ -25,7 +25,7 @@
class AddCharacteristicUsabilityAndSubCharacteristicsCompliance < ActiveRecord::Migration
def self.up
- execute_java_migration 'org.sonar.server.db.migrations.v51.AddNewCharacteristics'
+ execute_java_migration 'org.sonar.db.version.v51.AddNewCharacteristics'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/795_remove_permissions_on_modules.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/795_remove_permissions_on_modules.rb
index 9dec88eeb5c..3bf2fdf5b69 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/795_remove_permissions_on_modules.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/795_remove_permissions_on_modules.rb
@@ -25,7 +25,7 @@
class RemovePermissionsOnModules < ActiveRecord::Migration
def self.up
- execute_java_migration 'org.sonar.server.db.migrations.v51.RemovePermissionsOnModulesMigrationStep'
+ execute_java_migration 'org.sonar.db.version.v51.RemovePermissionsOnModulesMigrationStep'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/901_feed_project_links_component_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/901_feed_project_links_component_uuid.rb
index e35cedf1125..33e61aa4ec1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/901_feed_project_links_component_uuid.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/901_feed_project_links_component_uuid.rb
@@ -25,7 +25,7 @@
class FeedProjectLinksComponentUuid < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.FeedProjectLinksComponentUuid')
+ execute_java_migration('org.sonar.db.version.v52.FeedProjectLinksComponentUuid')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/904_feed_events_component_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/904_feed_events_component_uuid.rb
index fb840dfb750..aa2f56560cd 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/904_feed_events_component_uuid.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/904_feed_events_component_uuid.rb
@@ -25,7 +25,7 @@
class FeedEventsComponentUuid < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.FeedEventsComponentUuid')
+ execute_java_migration('org.sonar.db.version.v52.FeedEventsComponentUuid')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/908_move_project_profile_association.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/908_move_project_profile_association.rb
index b99be4e2a07..bc588913474 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/908_move_project_profile_association.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/908_move_project_profile_association.rb
@@ -25,7 +25,7 @@
class MoveProjectProfileAssociation < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.MoveProjectProfileAssociation')
+ execute_java_migration('org.sonar.db.version.v52.MoveProjectProfileAssociation')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/913_feed_file_sources_data_type.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/913_feed_file_sources_data_type.rb
index 08a4e97eea2..d3f289b4264 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/913_feed_file_sources_data_type.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/913_feed_file_sources_data_type.rb
@@ -25,7 +25,7 @@
class FeedFileSourcesDataType < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.FeedFileSourcesDataType')
+ execute_java_migration('org.sonar.db.version.v52.FeedFileSourcesDataType')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/916_feed_metrics_booleans.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/916_feed_metrics_booleans.rb
index 347164f04ef..fb30562c2c8 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/916_feed_metrics_booleans.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/916_feed_metrics_booleans.rb
@@ -25,7 +25,7 @@
class FeedMetricsBooleans < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.FeedMetricsBooleans')
+ execute_java_migration('org.sonar.db.version.v52.FeedMetricsBooleans')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/918_add_manual_measures_component_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/918_add_manual_measures_component_uuid.rb
index 4d23f59b2fa..e54e3b3b195 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/918_add_manual_measures_component_uuid.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/918_add_manual_measures_component_uuid.rb
@@ -25,7 +25,7 @@
class AddManualMeasuresComponentUuid < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.AddManualMeasuresComponentUuidColumn')
+ execute_java_migration('org.sonar.db.version.v52.AddManualMeasuresComponentUuidColumn')
add_index 'manual_measures', 'component_uuid', :name => 'manual_measures_component_uuid'
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/919_feed_manual_measures_component_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/919_feed_manual_measures_component_uuid.rb
index e96d56159f2..d0ef4374f4c 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/919_feed_manual_measures_component_uuid.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/919_feed_manual_measures_component_uuid.rb
@@ -25,7 +25,7 @@
class FeedManualMeasuresComponentUuid < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.FeedManualMeasuresComponentUuid')
+ execute_java_migration('org.sonar.db.version.v52.FeedManualMeasuresComponentUuid')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/920_remove_snapshot_libraries.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/920_remove_snapshot_libraries.rb
index 1d099ed68ec..aaa13cd6300 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/920_remove_snapshot_libraries.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/920_remove_snapshot_libraries.rb
@@ -25,7 +25,7 @@
class RemoveSnapshotLibraries < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.RemoveSnapshotLibraries')
+ execute_java_migration('org.sonar.db.version.v52.RemoveSnapshotLibraries')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/921_remove_component_libraries.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/921_remove_component_libraries.rb
index b199d2a7043..e5aec11f893 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/921_remove_component_libraries.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/921_remove_component_libraries.rb
@@ -25,7 +25,7 @@
class RemoveComponentLibraries < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.RemoveComponentLibraries')
+ execute_java_migration('org.sonar.db.version.v52.RemoveComponentLibraries')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/925_remove_duplicated_component_keys.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/925_remove_duplicated_component_keys.rb
index 9587a59029e..c11fcd6c6f8 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/925_remove_duplicated_component_keys.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/925_remove_duplicated_component_keys.rb
@@ -25,7 +25,7 @@
class RemoveDuplicatedComponentKeys < ActiveRecord::Migration
def self.up
- execute_java_migration('org.sonar.server.db.migrations.v52.RemoveDuplicatedComponentKeys')
+ execute_java_migration('org.sonar.db.version.v52.RemoveDuplicatedComponentKeys')
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/README.txt b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/README.txt
index f10856770f2..3cd43b6e984 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/README.txt
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/README.txt
@@ -2,16 +2,16 @@ HOW TO ADD A MIGRATION
* Jump some versions when adding the first Ruby on Rails migration of a new sonar version. For example if sonar 2.10 is 193, then sonar 2.11 should start at 200.
* Complete the DDL files for H2 :
- + sonar-core/src/main/resources/org/sonar/db/version/schema-h2.ddl
- + sonar-core/src/main/resources/org/sonar/db/version/rows-h2.sql :
+ + sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl
+ + sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql :
- add "INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('<THE MIGRATION ID>')"
-* Update the migration id defined in sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
-* If a table is added or removed, then edit sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
-* Changes in bulk must be handled using Java migrations based on org.sonar.server.db.migrations.MassUpdate :
- + Create the class for the Java migration in package package org.sonar.server.db.migrations.vXYZ, where XYZ is the version of SQ without dots
- + Add the class to org.sonar.server.db.migrations.MigrationStepModule
- + Create a Ruby migration which calls execute_java_migration('org.sonar.server.db.migrations.vXYZ.MyMigration')
- + Simple, "one to one" migrations that only need to be split by 1000 can rely on class org.sonar.server.db.migrations.BaseDataChange
+* Update the migration id defined in org.sonar.db.version.DatabaseVersion
+* If a table is added or removed, then edit org.sonar.db.version.DatabaseVersion#TABLES
+* Changes in bulk must be handled using Java migrations based on org.sonar.db.version.MassUpdate :
+ + Create the class for the Java migration in package org.sonar.db.version.vXYZ, where XYZ is the version of SQ without dots
+ + Add the class to org.sonar.db.version.MigrationStepModule
+ + Create a Ruby migration which calls execute_java_migration('org.sonar.db.version.vXYZ.MyMigration')
+ + Simple, "one to one" migrations that only need to be split by 1000 can rely on class org.sonar.db.version.BaseDataChange
RECOMMENDATIONS
diff --git a/sonar-db/pom.xml b/sonar-db/pom.xml
index 070b72f0696..741e47caa35 100644
--- a/sonar-db/pom.xml
+++ b/sonar-db/pom.xml
@@ -25,6 +25,10 @@
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-csv</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-batch-protocol</artifactId>
</dependency>
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/AddColumnsBuilder.java b/sonar-db/src/main/java/org/sonar/db/version/AddColumnsBuilder.java
index 6a2127247e1..ab6543fffe7 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/AddColumnsBuilder.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/AddColumnsBuilder.java
@@ -17,22 +17,19 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
-
-import static com.google.common.collect.Lists.newArrayList;
+package org.sonar.db.version;
+import com.google.common.base.CharMatcher;
+import com.google.common.base.Preconditions;
import java.util.List;
-
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-
import org.sonar.db.dialect.Dialect;
import org.sonar.db.dialect.MsSql;
import org.sonar.db.dialect.Oracle;
import org.sonar.db.dialect.PostgreSql;
-import com.google.common.base.CharMatcher;
-import com.google.common.base.Preconditions;
+import static com.google.common.collect.Lists.newArrayList;
public class AddColumnsBuilder {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/BaseDataChange.java b/sonar-db/src/main/java/org/sonar/db/version/BaseDataChange.java
index 1988ea4d3dc..800e66a7e34 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/BaseDataChange.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/BaseDataChange.java
@@ -17,11 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.Connection;
import java.sql.SQLException;
-
import org.apache.commons.dbutils.DbUtils;
import org.sonar.db.Database;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/BaseSqlStatement.java b/sonar-db/src/main/java/org/sonar/db/version/BaseSqlStatement.java
index 8983e7ecb5c..f302311bb2d 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/BaseSqlStatement.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/BaseSqlStatement.java
@@ -17,16 +17,14 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.sql.Types;
import java.util.Date;
-
import javax.annotation.Nullable;
-
import org.apache.commons.dbutils.DbUtils;
class BaseSqlStatement<CHILD extends SqlStatement> implements SqlStatement<CHILD> {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DataChange.java b/sonar-db/src/main/java/org/sonar/db/version/DataChange.java
index fa017afcd6d..d06e4d7b093 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DataChange.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/DataChange.java
@@ -17,11 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.Connection;
import java.sql.SQLException;
-
import org.sonar.db.Database;
public interface DataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigration.java b/sonar-db/src/main/java/org/sonar/db/version/DatabaseMigration.java
index e7e5a56c27c..1d00155e13b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigration.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/DatabaseMigration.java
@@ -17,10 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
-import javax.annotation.CheckForNull;
import java.util.Date;
+import javax.annotation.CheckForNull;
public interface DatabaseMigration {
enum Status {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DdlChange.java b/sonar-db/src/main/java/org/sonar/db/version/DdlChange.java
index 626b9f6e369..1e2bcb47582 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DdlChange.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/DdlChange.java
@@ -17,11 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.Connection;
import java.sql.SQLException;
-
import org.apache.commons.dbutils.DbUtils;
import org.sonar.db.Database;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DropColumnsBuilder.java b/sonar-db/src/main/java/org/sonar/db/version/DropColumnsBuilder.java
index e0274003311..61a0fbc45c8 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/DropColumnsBuilder.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/DropColumnsBuilder.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import org.sonar.db.dialect.Dialect;
import org.sonar.db.dialect.MsSql;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MassUpdate.java b/sonar-db/src/main/java/org/sonar/db/version/MassUpdate.java
index 725600feff9..a09ed828a5c 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MassUpdate.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/MassUpdate.java
@@ -17,13 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.concurrent.atomic.AtomicLong;
-import org.sonar.db.Database;
import org.sonar.core.util.ProgressLogger;
+import org.sonar.db.Database;
public class MassUpdate {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStep.java b/sonar-db/src/main/java/org/sonar/db/version/MigrationStep.java
index f2c051e083c..f34fdcffcd8 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationStep.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/MigrationStep.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.SQLException;
diff --git a/sonar-db/src/main/java/org/sonar/db/version/MigrationStepModule.java b/sonar-db/src/main/java/org/sonar/db/version/MigrationStepModule.java
new file mode 100644
index 00000000000..4e1ea5cd811
--- /dev/null
+++ b/sonar-db/src/main/java/org/sonar/db/version/MigrationStepModule.java
@@ -0,0 +1,108 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.db.version;
+
+import org.sonar.core.platform.Module;
+import org.sonar.db.version.v451.AddMissingCustomRuleParametersMigrationStep;
+import org.sonar.db.version.v451.DeleteUnescapedActivities;
+import org.sonar.db.version.v50.FeedFileSources;
+import org.sonar.db.version.v50.FeedIssueLongDates;
+import org.sonar.db.version.v50.FeedSnapshotSourcesUpdatedAt;
+import org.sonar.db.version.v50.InsertProjectsAuthorizationUpdatedAtMigrationStep;
+import org.sonar.db.version.v50.PopulateProjectsUuidColumnsMigrationStep;
+import org.sonar.db.version.v50.RemoveSortFieldFromIssueFiltersMigrationStep;
+import org.sonar.db.version.v50.ReplaceIssueFiltersProjectKeyByUuid;
+import org.sonar.db.version.v51.AddIssuesColumns;
+import org.sonar.db.version.v51.AddNewCharacteristics;
+import org.sonar.db.version.v51.CopyScmAccountsFromAuthorsToUsers;
+import org.sonar.db.version.v51.DropIssuesColumns;
+import org.sonar.db.version.v51.FeedAnalysisReportsLongDates;
+import org.sonar.db.version.v51.FeedEventsLongDates;
+import org.sonar.db.version.v51.FeedFileSourcesBinaryData;
+import org.sonar.db.version.v51.FeedIssueChangesLongDates;
+import org.sonar.db.version.v51.FeedIssueComponentUuids;
+import org.sonar.db.version.v51.FeedIssueTags;
+import org.sonar.db.version.v51.FeedIssuesLongDates;
+import org.sonar.db.version.v51.FeedManualMeasuresLongDates;
+import org.sonar.db.version.v51.FeedSnapshotsLongDates;
+import org.sonar.db.version.v51.FeedUsersLongDates;
+import org.sonar.db.version.v51.RemovePermissionsOnModulesMigrationStep;
+import org.sonar.db.version.v51.RenameComponentRelatedParamsInIssueFilters;
+import org.sonar.db.version.v51.UpdateProjectsModuleUuidPath;
+import org.sonar.db.version.v52.AddManualMeasuresComponentUuidColumn;
+import org.sonar.db.version.v52.FeedEventsComponentUuid;
+import org.sonar.db.version.v52.FeedFileSourcesDataType;
+import org.sonar.db.version.v52.FeedManualMeasuresComponentUuid;
+import org.sonar.db.version.v52.FeedMetricsBooleans;
+import org.sonar.db.version.v52.FeedProjectLinksComponentUuid;
+import org.sonar.db.version.v52.MoveProjectProfileAssociation;
+import org.sonar.db.version.v52.RemoveComponentLibraries;
+import org.sonar.db.version.v52.RemoveDuplicatedComponentKeys;
+import org.sonar.db.version.v52.RemoveSnapshotLibraries;
+
+public class MigrationStepModule extends Module {
+ @Override
+ protected void configureModule() {
+ add(
+ // 4.5.1
+ AddMissingCustomRuleParametersMigrationStep.class,
+ DeleteUnescapedActivities.class,
+
+ // 5.0
+ InsertProjectsAuthorizationUpdatedAtMigrationStep.class,
+ PopulateProjectsUuidColumnsMigrationStep.class,
+ ReplaceIssueFiltersProjectKeyByUuid.class,
+ FeedSnapshotSourcesUpdatedAt.class,
+ FeedFileSources.class,
+ FeedIssueLongDates.class,
+ RemoveSortFieldFromIssueFiltersMigrationStep.class,
+
+ // 5.1
+ FeedIssueTags.class,
+ FeedUsersLongDates.class,
+ RenameComponentRelatedParamsInIssueFilters.class,
+ CopyScmAccountsFromAuthorsToUsers.class,
+ FeedIssueChangesLongDates.class,
+ FeedAnalysisReportsLongDates.class,
+ UpdateProjectsModuleUuidPath.class,
+ FeedIssueComponentUuids.class,
+ FeedSnapshotsLongDates.class,
+ FeedIssuesLongDates.class,
+ FeedFileSourcesBinaryData.class,
+ FeedManualMeasuresLongDates.class,
+ FeedEventsLongDates.class,
+ AddNewCharacteristics.class,
+ RemovePermissionsOnModulesMigrationStep.class,
+ AddIssuesColumns.class,
+ DropIssuesColumns.class,
+
+ // 5.2
+ FeedProjectLinksComponentUuid.class,
+ FeedEventsComponentUuid.class,
+ MoveProjectProfileAssociation.class,
+ FeedFileSourcesDataType.class,
+ FeedMetricsBooleans.class,
+ AddManualMeasuresComponentUuidColumn.class,
+ FeedManualMeasuresComponentUuid.class,
+ RemoveSnapshotLibraries.class,
+ RemoveComponentLibraries.class,
+ RemoveDuplicatedComponentKeys.class);
+ }
+}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/Select.java b/sonar-db/src/main/java/org/sonar/db/version/Select.java
index 5d3b8226f60..ab9433d25e6 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/Select.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/Select.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
@@ -25,7 +25,6 @@ import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
-
import javax.annotation.CheckForNull;
public interface Select extends SqlStatement<Select> {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java b/sonar-db/src/main/java/org/sonar/db/version/SelectImpl.java
index c03ba33c3f3..90031326979 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SelectImpl.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/SelectImpl.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -25,7 +25,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
-
import org.apache.commons.dbutils.DbUtils;
import org.sonar.db.Database;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SqlStatement.java b/sonar-db/src/main/java/org/sonar/db/version/SqlStatement.java
index c6f8264567b..4418f659b16 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/SqlStatement.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/SqlStatement.java
@@ -17,11 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.SQLException;
import java.util.Date;
-
import javax.annotation.Nullable;
public interface SqlStatement<CHILD extends SqlStatement> {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/Upsert.java b/sonar-db/src/main/java/org/sonar/db/version/Upsert.java
index 302d0c99b03..31068959a1b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/Upsert.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/Upsert.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.SQLException;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/UpsertImpl.java b/sonar-db/src/main/java/org/sonar/db/version/UpsertImpl.java
index 2f9a097c152..7f58429fac3 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/UpsertImpl.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/UpsertImpl.java
@@ -17,12 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
-
import org.sonar.db.BatchSession;
public class UpsertImpl extends BaseSqlStatement<Upsert> implements Upsert {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationStep.java b/sonar-db/src/main/java/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationStep.java
index bb131ab5105..ec8aa9cdbe6 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationStep.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationStep.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v451;
+package org.sonar.db.version.v451;
import com.google.common.base.Predicate;
import com.google.common.collect.ArrayListMultimap;
@@ -30,13 +30,13 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.Nullable;
import org.sonar.api.utils.System2;
+import org.sonar.core.util.ProgressLogger;
+import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
+import org.sonar.db.version.MigrationStep;
import org.sonar.db.version.v45.Migration45Mapper;
import org.sonar.db.version.v45.Rule;
import org.sonar.db.version.v45.RuleParameter;
-import org.sonar.db.DbClient;
-import org.sonar.server.db.migrations.MigrationStep;
-import org.sonar.core.util.ProgressLogger;
/**
* See http://jira.sonarsource.com/browse/SONAR-5575
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivities.java b/sonar-db/src/main/java/org/sonar/db/version/v451/DeleteUnescapedActivities.java
index f352ba58ab4..d22ba822f47 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivities.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v451/DeleteUnescapedActivities.java
@@ -17,18 +17,16 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v451;
+package org.sonar.db.version.v451;
import java.sql.SQLException;
-
import javax.annotation.Nullable;
-
import org.apache.commons.lang.StringUtils;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* See http://jira.sonarsource.com/browse/SONAR-5758
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedFileSources.java b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java
index 9f2130401a1..5a4c3921bf5 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedFileSources.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java
@@ -17,22 +17,20 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
-
-import org.apache.commons.lang.StringUtils;
-import org.sonar.api.utils.System2;
-import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.Select.RowReader;
-import org.sonar.server.db.migrations.SqlStatement;
-
-import javax.annotation.Nullable;
+package org.sonar.db.version.v50;
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
import java.util.Date;
+import javax.annotation.Nullable;
+import org.apache.commons.lang.StringUtils;
+import org.sonar.api.utils.System2;
+import org.sonar.db.Database;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.Select.RowReader;
+import org.sonar.db.version.SqlStatement;
/**
* Used in the Active Record Migration 714
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedIssueLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedIssueLongDates.java
index 6e9f40b027c..c9fd8cfbebe 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedIssueLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedIssueLongDates.java
@@ -17,17 +17,16 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedIssueLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedSnapshotSourcesUpdatedAt.java b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedSnapshotSourcesUpdatedAt.java
index 0909244e399..cc1e6859b5f 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FeedSnapshotSourcesUpdatedAt.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedSnapshotSourcesUpdatedAt.java
@@ -18,15 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import java.sql.SQLException;
-
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* Used in the Active Record Migration 712
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FileSourceDto.java b/sonar-db/src/main/java/org/sonar/db/version/v50/FileSourceDto.java
index f3ca467ee98..ca1683ffa2d 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/FileSourceDto.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/FileSourceDto.java
@@ -17,10 +17,20 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.StringUtils;
import org.codehaus.stax2.XMLInputFactory2;
@@ -31,18 +41,6 @@ import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.utils.KeyValueFormat;
import org.sonar.api.utils.text.CsvWriter;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-
-import java.io.ByteArrayOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.StringReader;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
import static java.nio.charset.StandardCharsets.UTF_8;
class FileSourceDto {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationStep.java b/sonar-db/src/main/java/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationStep.java
index 86ee9322c65..d088be4f190 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationStep.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationStep.java
@@ -18,15 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import java.sql.SQLException;
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* Used in the Active Record Migration 716
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationStep.java b/sonar-db/src/main/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationStep.java
index f677eee9c8c..181d0aeebf3 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationStep.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationStep.java
@@ -18,26 +18,23 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicLong;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;
import org.sonar.api.resources.Scopes;
import org.sonar.api.utils.internal.Uuids;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
-import org.sonar.db.DbSession;
-import org.sonar.db.version.v50.Component;
-import org.sonar.db.version.v50.Migration50Mapper;
-import org.sonar.db.DbClient;
-import org.sonar.server.db.migrations.MigrationStep;
import org.sonar.core.util.ProgressLogger;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicLong;
+import org.sonar.db.DbClient;
+import org.sonar.db.DbSession;
+import org.sonar.db.version.MigrationStep;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Maps.newHashMap;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationStep.java b/sonar-db/src/main/java/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationStep.java
index 3e266bdbb9d..50b1bd4c445 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationStep.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationStep.java
@@ -17,21 +17,19 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
+import com.google.common.collect.Lists;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
-
import org.apache.commons.lang.StringUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
-
-import com.google.common.collect.Lists;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
// TODO could be refactored to benefit from existing code of ReplaceIssueFiltersProjectKeyByUuid
// -> make any change of issue_filters easier
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuid.java b/sonar-db/src/main/java/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuid.java
index b0854b468d3..16e2ca6a2f3 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuid.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuid.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -30,10 +30,10 @@ import org.apache.commons.dbutils.DbUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
import org.sonar.db.DatabaseUtils;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* Used in the Active Record Migration 710
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddIssuesColumns.java b/sonar-db/src/main/java/org/sonar/db/version/v51/AddIssuesColumns.java
index 82f77053738..09ffbdb94a8 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddIssuesColumns.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/AddIssuesColumns.java
@@ -18,13 +18,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
-
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.AddColumnsBuilder;
-import org.sonar.server.db.migrations.DdlChange;
+import org.sonar.db.version.AddColumnsBuilder;
+import org.sonar.db.version.DdlChange;
/**
* Add the following columns to the issues table :
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddNewCharacteristics.java b/sonar-db/src/main/java/org/sonar/db/version/v51/AddNewCharacteristics.java
index 2bd5e53439b..2623dcb75e0 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddNewCharacteristics.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/AddNewCharacteristics.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
@@ -31,8 +31,8 @@ import org.sonar.api.utils.System2;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.Select;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.Select;
/**
* See http://jira.sonarsource.com/browse/SONAR-6187
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsers.java b/sonar-db/src/main/java/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsers.java
index 751339a6e39..0ae65deb79f 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsers.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsers.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import com.google.common.base.Joiner;
import com.google.common.collect.ArrayListMultimap;
@@ -29,12 +29,12 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.CheckForNull;
import org.sonar.api.utils.System2;
-import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.Upsert;
-import org.sonar.server.db.migrations.UpsertImpl;
import org.sonar.core.util.ProgressLogger;
+import org.sonar.db.Database;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.Upsert;
+import org.sonar.db.version.UpsertImpl;
import static com.google.common.collect.Lists.newArrayList;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/DropIssuesColumns.java b/sonar-db/src/main/java/org/sonar/db/version/v51/DropIssuesColumns.java
index 929dac7e746..a8a0557e6a8 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/DropIssuesColumns.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/DropIssuesColumns.java
@@ -18,15 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
+import com.google.common.annotations.VisibleForTesting;
import java.sql.SQLException;
-
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.DdlChange;
-import org.sonar.server.db.migrations.DropColumnsBuilder;
-
-import com.google.common.annotations.VisibleForTesting;
+import org.sonar.db.version.DdlChange;
+import org.sonar.db.version.DropColumnsBuilder;
/**
* Drop the following columns from the issues table :
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedAnalysisReportsLongDates.java
index 394093affe9..42434d8d727 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedAnalysisReportsLongDates.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedAnalysisReportsLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedEventsLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedEventsLongDates.java
index 453483828ce..151fa7c9cff 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedEventsLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedEventsLongDates.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedEventsLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryData.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java
index 38fc957f6d8..7e3d5e5ef74 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryData.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedFileSourcesBinaryData.java
@@ -17,14 +17,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
+import com.google.common.base.Function;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Iterables;
import java.sql.SQLException;
import java.util.Iterator;
-
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
@@ -33,16 +34,12 @@ import org.apache.commons.lang.StringUtils;
import org.sonar.api.utils.DateUtils;
import org.sonar.db.Database;
import org.sonar.db.source.FileSourceDto;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
import org.sonar.server.source.db.FileSourceDb;
-import com.google.common.base.Function;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterables;
-
public class FeedFileSourcesBinaryData extends BaseDataChange {
public FeedFileSourcesBinaryData(Database db) {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueChangesLongDates.java
index cace6b275f4..78c6a81b334 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueChangesLongDates.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedIssueChangesLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueComponentUuids.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueComponentUuids.java
index ea8a16d65f2..0bfe58afd52 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueComponentUuids.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueComponentUuids.java
@@ -18,15 +18,15 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.MassUpdate.Handler;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.MassUpdate.Handler;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.SqlStatement;
public class FeedIssueComponentUuids extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueTags.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueTags.java
index 9b688617792..f84dd6b3688 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssueTags.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssueTags.java
@@ -17,23 +17,21 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Maps;
import java.sql.SQLException;
import java.util.Map;
-
import org.apache.commons.lang.StringUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.MassUpdate.Handler;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.Select.RowHandler;
-import org.sonar.server.db.migrations.SqlStatement;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.Maps;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.MassUpdate.Handler;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.Select.RowHandler;
+import org.sonar.db.version.SqlStatement;
/**
* SONAR-5897
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssuesLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssuesLongDates.java
index c106d3fbd9a..66ba13b9248 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedIssuesLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedIssuesLongDates.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedIssuesLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedManualMeasuresLongDates.java
index 0ea665bcb3c..cb250c840d0 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedManualMeasuresLongDates.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedManualMeasuresLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java
index 718a1398a1e..5e5ae4f149b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedSnapshotsLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedUsersLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedUsersLongDates.java
index dc71ff5f92a..0196e62fc57 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedUsersLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedUsersLongDates.java
@@ -17,17 +17,16 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import java.util.Date;
-
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedUsersLongDates extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationStep.java b/sonar-db/src/main/java/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationStep.java
index 56f7507a191..bb70c544e89 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationStep.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationStep.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* See http://jira.sonarsource.com/browse/SONAR-5596
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFilters.java b/sonar-db/src/main/java/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFilters.java
index 2327fead4fd..73e8e8b9a79 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFilters.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFilters.java
@@ -17,21 +17,19 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
+import com.google.common.collect.Lists;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
-
import org.apache.commons.lang.StringUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
-
-import com.google.common.collect.Lists;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class RenameComponentRelatedParamsInIssueFilters extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java b/sonar-db/src/main/java/org/sonar/db/version/v51/UpdateProjectsModuleUuidPath.java
index e19491a9f10..d07f9acc2f8 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/UpdateProjectsModuleUuidPath.java
@@ -18,19 +18,17 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.SQLException;
-
import javax.annotation.Nullable;
-
import org.apache.commons.lang.StringUtils;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.MassUpdate.Handler;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.MassUpdate.Handler;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.SqlStatement;
/**
* SONAR-6054
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumn.java b/sonar-db/src/main/java/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumn.java
index 36f3e45609a..686db41ae2f 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumn.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumn.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.AddColumnsBuilder;
-import org.sonar.server.db.migrations.DdlChange;
+import org.sonar.db.version.AddColumnsBuilder;
+import org.sonar.db.version.DdlChange;
-import static org.sonar.server.db.migrations.AddColumnsBuilder.ColumnDef.Type.STRING;
+import static org.sonar.db.version.AddColumnsBuilder.ColumnDef.Type.STRING;
/**
* Add the following column to the manual_measures table :
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedEventsComponentUuid.java b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedEventsComponentUuid.java
index a8fa8071d5f..a6139e1e946 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedEventsComponentUuid.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedEventsComponentUuid.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedEventsComponentUuid extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedFileSourcesDataType.java b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedFileSourcesDataType.java
index 6b5d0ebdcfd..b37e60054b3 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedFileSourcesDataType.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedFileSourcesDataType.java
@@ -18,12 +18,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
-
-import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.db.version.BaseDataChange;
public class FeedFileSourcesDataType extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuid.java b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedManualMeasuresComponentUuid.java
index 6a7d73b99e8..36b14ac2e83 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuid.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedManualMeasuresComponentUuid.java
@@ -18,18 +18,17 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
public class FeedManualMeasuresComponentUuid extends BaseDataChange {
-
public FeedManualMeasuresComponentUuid(Database db) {
super(db);
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedMetricsBooleans.java b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedMetricsBooleans.java
index 3ee8edf05d9..f28bc096e5b 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedMetricsBooleans.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedMetricsBooleans.java
@@ -18,11 +18,11 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
+import org.sonar.db.version.BaseDataChange;
public class FeedMetricsBooleans extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuid.java b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedProjectLinksComponentUuid.java
index 880d7a9b0b8..4162aacb2ca 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuid.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/FeedProjectLinksComponentUuid.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.SqlStatement;
public class FeedProjectLinksComponentUuid extends BaseDataChange {
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociation.java b/sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java
index ced52132436..d533aa73ef4 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociation.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java
@@ -17,24 +17,22 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
+import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.Table;
import java.sql.SQLException;
-
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.MassUpdate.Handler;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.Select.RowReader;
-import org.sonar.server.db.migrations.SqlStatement;
-import org.sonar.server.db.migrations.Upsert;
-
-import com.google.common.collect.HashBasedTable;
-import com.google.common.collect.Table;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.MassUpdate.Handler;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.Select.RowReader;
+import org.sonar.db.version.SqlStatement;
+import org.sonar.db.version.Upsert;
/**
* SonarQube 5.2
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveComponentLibraries.java b/sonar-db/src/main/java/org/sonar/db/version/v52/RemoveComponentLibraries.java
index ee18d266113..11945b60316 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveComponentLibraries.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/RemoveComponentLibraries.java
@@ -18,21 +18,20 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* Remove all components having qualifier 'LIB'
*/
public class RemoveComponentLibraries extends BaseDataChange {
-
public RemoveComponentLibraries(Database db) {
super(db);
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeys.java b/sonar-db/src/main/java/org/sonar/db/version/v52/RemoveDuplicatedComponentKeys.java
index 724b6076b9c..557c562fca0 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeys.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/RemoveDuplicatedComponentKeys.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
@@ -29,9 +29,9 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.Nonnull;
import org.sonar.core.util.ProgressLogger;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.Upsert;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.Upsert;
/**
* Remove all duplicated component that have the same keys.
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveSnapshotLibraries.java b/sonar-db/src/main/java/org/sonar/db/version/v52/RemoveSnapshotLibraries.java
index 5ed747ff313..108200dac7e 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/RemoveSnapshotLibraries.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/RemoveSnapshotLibraries.java
@@ -18,21 +18,20 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.SQLException;
import org.sonar.db.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
-import org.sonar.server.db.migrations.Select;
-import org.sonar.server.db.migrations.SqlStatement;
+import org.sonar.db.version.BaseDataChange;
+import org.sonar.db.version.MassUpdate;
+import org.sonar.db.version.Select;
+import org.sonar.db.version.SqlStatement;
/**
* Remove all components having qualifier 'LIB'
*/
public class RemoveSnapshotLibraries extends BaseDataChange {
-
public RemoveSnapshotLibraries(Database db) {
super(db);
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/AddColumnsBuilderTest.java b/sonar-db/src/test/java/org/sonar/db/version/AddColumnsBuilderTest.java
index 2ce3e5b8b9a..e5160243c7f 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/AddColumnsBuilderTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/AddColumnsBuilderTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import org.junit.Test;
import org.sonar.db.dialect.H2;
@@ -25,6 +25,7 @@ import org.sonar.db.dialect.MsSql;
import org.sonar.db.dialect.MySql;
import org.sonar.db.dialect.Oracle;
import org.sonar.db.dialect.PostgreSql;
+import org.sonar.db.version.AddColumnsBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java b/sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java
index a9bc1222f9c..56a5ed91799 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/BaseDataChangeTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/BaseDataChangeTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -31,8 +31,8 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
import org.sonar.db.BatchSession;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.Select.RowReader;
+import org.sonar.db.version.Select.Row;
+import org.sonar.db.version.Select.RowReader;
import org.sonar.test.DbTests;
import static org.assertj.core.api.Assertions.assertThat;
@@ -442,7 +442,7 @@ public class BaseDataChangeTest {
.list(new Select.RowReader<Object[]>() {
@Override
public Object[] read(Select.Row row) throws SQLException {
- return new Object[]{
+ return new Object[] {
// id, login, age, enabled
row.getLong(1),
row.getString(2),
@@ -467,7 +467,7 @@ public class BaseDataChangeTest {
static class UserReader implements Select.RowReader<Object[]> {
@Override
public Object[] read(Select.Row row) throws SQLException {
- return new Object[]{
+ return new Object[] {
// id, login, age, enabled
row.getNullableLong(1),
row.getNullableString(2),
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DropColumnsBuilderTest.java b/sonar-db/src/test/java/org/sonar/db/version/DropColumnsBuilderTest.java
index eae6d7aec34..e7c6955f185 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/DropColumnsBuilderTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/DropColumnsBuilderTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import org.junit.Test;
import org.sonar.db.dialect.H2;
@@ -25,6 +25,7 @@ import org.sonar.db.dialect.MsSql;
import org.sonar.db.dialect.MySql;
import org.sonar.db.dialect.Oracle;
import org.sonar.db.dialect.PostgreSql;
+import org.sonar.db.version.DropColumnsBuilder;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/MigrationStepModuleTest.java b/sonar-db/src/test/java/org/sonar/db/version/MigrationStepModuleTest.java
index 2faccd0c35b..6c3fb4cba25 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/MigrationStepModuleTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/MigrationStepModuleTest.java
@@ -17,10 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations;
+package org.sonar.db.version;
import org.junit.Test;
import org.sonar.core.platform.ComponentContainer;
+import org.sonar.db.version.MigrationStepModule;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest.java
index cbed368d4b5..eb291dda5c9 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v451;
+package org.sonar.db.version.v451;
import org.junit.Before;
import org.junit.Rule;
@@ -25,8 +25,7 @@ import org.junit.Test;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.DbClient;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -43,8 +42,7 @@ public class AddMissingCustomRuleParametersMigrationTest {
public void setUp() {
db.executeUpdateSql("truncate table rules");
db.executeUpdateSql("truncate table rules_parameters");
- DbClient dbClient = new DbClient(db.database(), db.myBatis());
- migration = new AddMissingCustomRuleParametersMigrationStep(dbClient, system);
+ migration = new AddMissingCustomRuleParametersMigrationStep(db.getDbClient(), system);
when(system.now()).thenReturn(DateUtils.parseDate("2014-10-09").getTime());
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest.java
index 8435a71c58f..00808bb8f0a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest.java
@@ -17,13 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v451;
+package org.sonar.db.version.v451;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedFileSourcesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/FeedFileSourcesTest.java
index aed7db94f03..1ac8362180a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedFileSourcesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/FeedFileSourcesTest.java
@@ -18,8 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
+import java.nio.charset.StandardCharsets;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.util.List;
+import java.util.Map;
import org.apache.commons.dbutils.DbUtils;
import org.junit.Before;
import org.junit.Rule;
@@ -28,12 +33,6 @@ import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import java.nio.charset.StandardCharsets;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.util.List;
-import java.util.Map;
-
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/FeedIssueLongDatesTest.java
index ba054c0bd27..5969a262803 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/FeedIssueLongDatesTest.java
@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FileSourceDtoTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/FileSourceDtoTest.java
index fc4090f8adf..ebb137512cd 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/FileSourceDtoTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/FileSourceDtoTest.java
@@ -17,9 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import org.junit.Test;
+import org.sonar.db.version.v50.FileSourceDto;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java
index e39bf0effc8..4226635344a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest.java
index a39424b627e..4de215aae6f 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import com.google.common.collect.ImmutableSet;
import org.junit.Before;
@@ -27,9 +27,7 @@ import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbClient;
import org.sonar.db.DbTester;
-import org.sonar.db.version.v50.Component;
-import org.sonar.db.version.v50.Migration50Mapper;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest.java
index b4fdfb13b1d..bf96e3af226 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import org.junit.Before;
import org.junit.Rule;
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest.java b/sonar-db/src/test/java/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest.java
index 591b8e67bb2..e51c5fd2b32 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v50;
+package org.sonar.db.version.v50;
import org.junit.Before;
import org.junit.Rule;
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/AddIssuesColumnsTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/AddIssuesColumnsTest.java
index 6c3f1153a26..40683d1ebb4 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/AddIssuesColumnsTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/AddIssuesColumnsTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.sql.Types;
import org.junit.Before;
@@ -25,7 +25,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class AddIssuesColumnsTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/AddNewCharacteristicsTest.java
index 721ab0df29b..cfc43d2246d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/AddNewCharacteristicsTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
@@ -26,7 +26,7 @@ import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.MessageException;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static junit.framework.TestCase.fail;
import static org.assertj.core.api.Assertions.assertThat;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest.java
index 58d6f77df56..c0345ad2862 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest.java
@@ -18,17 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
+import java.util.Map;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
import org.sonar.db.user.UserDto;
-import org.sonar.server.db.migrations.MigrationStep;
-
-import java.util.Map;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/DropIssuesColumnsTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/DropIssuesColumnsTest.java
index 37b4f6c05dd..3971e9c1838 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/DropIssuesColumnsTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/DropIssuesColumnsTest.java
@@ -17,12 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Test;
import org.sonar.db.Database;
import org.sonar.db.dialect.PostgreSql;
+import org.sonar.db.version.v51.DropIssuesColumns;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@@ -45,7 +46,7 @@ public class DropIssuesColumnsTest {
when(database.getDialect()).thenReturn(new PostgreSql());
assertThat(migration.generateSql()).isEqualTo(
"ALTER TABLE issues DROP COLUMN issue_creation_date, DROP COLUMN issue_update_date, DROP COLUMN issue_close_date, DROP COLUMN component_id, DROP COLUMN root_component_id"
- );
+ );
}
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest.java
index 8ecbc61167f..c3e75f1fc75 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest.java
@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedEventsLongDatesTest.java
index c38024dcd59..96104aee886 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedEventsLongDatesTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest.java
index 507e4909781..2bf3bc23004 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest.java
@@ -17,8 +17,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
+import java.io.InputStream;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
import org.apache.commons.dbutils.DbUtils;
import org.junit.Rule;
import org.junit.Test;
@@ -26,15 +31,9 @@ import org.junit.rules.ExpectedException;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
import org.sonar.db.source.FileSourceDto;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import org.sonar.server.source.db.FileSourceDb;
-import java.io.InputStream;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
import static org.assertj.core.api.Assertions.assertThat;
public class FeedFileSourcesBinaryDataTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest.java
index 78387bff3a2..01690ce52df 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest.java
@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueComponentUuidsTest.java
index 5494152bdf7..de5f1c94c05 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueComponentUuidsTest.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueTagsTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueTagsTest.java
index ac655d4f14c..1e630545f94 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssueTagsTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssueTagsTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import java.util.Date;
import org.junit.Before;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssuesLongDatesTest.java
index d92683e3d59..b10df31cb5d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedIssuesLongDatesTest.java
@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest.java
index f5a79b77316..2b4f3f5facb 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest.java
index 1faef7d2819..8eeb8bb588b 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest.java
@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedUsersLongDatesTest.java
index 1ffb90bbd59..88923fbcb6e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/FeedUsersLongDatesTest.java
@@ -18,13 +18,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest.java
index e60a4b553f1..3b41af6846e 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest.java
@@ -17,14 +17,14 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class RemovePermissionsOnModulesMigrationTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest.java
index c04248c4946..b2ecde9fa88 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest.java
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
@@ -25,7 +25,7 @@ import org.junit.Test;
import org.sonar.api.utils.DateUtils;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java b/sonar-db/src/test/java/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest.java
index 2e5ec28b0f0..89a8d7e6c7d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v51;
+package org.sonar.db.version.v51;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class UpdateProjectsModuleUuidPathTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumnTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumnTest.java
index 5db7435c27f..07f48d9a144 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumnTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumnTest.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import java.sql.Types;
import org.junit.Before;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedEventsComponentUuidTest.java
index e2649254900..87f156d39be 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedEventsComponentUuidTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class FeedEventsComponentUuidTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest.java
index 0ea0b693a5e..615a41ba117 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class FeedFileSourcesDataTypeTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest.java
index 1136210fe9b..cf76d6a4430 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest.java
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedMetricsBooleansTest.java
index 4b854f2fdcb..b565f04dd34 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedMetricsBooleansTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class FeedMetricsBooleansTest {
@Rule
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest.java
index 908a6b04270..4487d000614 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class FeedProjectLinksComponentUuidTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/MoveProjectProfileAssociationTest.java
index f27c11b6466..982859c34ae 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/MoveProjectProfileAssociationTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class MoveProjectProfileAssociationTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/RemoveComponentLibrariesTest.java
index 4a6400bfd63..fa1d876f5af 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/RemoveComponentLibrariesTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class RemoveComponentLibrariesTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest.java
index 718723f82a5..79d5b1511ab 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class RemoveDuplicatedComponentKeysTest {
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest.java
index e421fdb4c7f..c9163a6c702 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest.java
@@ -18,14 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-package org.sonar.server.db.migrations.v52;
+package org.sonar.db.version.v52;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.sonar.api.utils.System2;
import org.sonar.db.DbTester;
-import org.sonar.server.db.migrations.MigrationStep;
+import org.sonar.db.version.MigrationStep;
public class RemoveSnapshotLibrariesTest {
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/batch-insert-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/batch-insert-result.xml
index 96ecbf4062f..96ecbf4062f 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/batch-insert-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/batch-insert-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/insert-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/insert-result.xml
index 32b7ac03f06..32b7ac03f06 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/insert-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/insert-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/mass-update-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/mass-update-result.xml
index 9eb2317febf..9eb2317febf 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/mass-update-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/mass-update-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/persons.xml b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/persons.xml
index 62c226d53b7..62c226d53b7 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/persons.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/persons.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/schema.sql
index 499b25b599d..499b25b599d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/scroll-and-update-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/scroll-and-update-result.xml
index 0cf4e593d4d..0cf4e593d4d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/scroll-and-update-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/scroll-and-update-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/update-null-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/update-null-result.xml
index ec48c899b40..ec48c899b40 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/BaseDataChangeTest/update-null-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/BaseDataChangeTest/update-null-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/after.xml b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/after.xml
index 5a463c17471..bb36c83c788 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/after.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/after.xml
@@ -1,19 +1,19 @@
<dataset>
<!-- with default value -->
- <rules_parameters id="1" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]" />
+ <rules_parameters id="1" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]"/>
<!-- without default value, to be ignored -->
- <rules_parameters id="2" rule_id="10" name="min" param_type="INT" default_value="[null]" description="[null]" />
+ <rules_parameters id="2" rule_id="10" name="min" param_type="INT" default_value="[null]" description="[null]"/>
<!-- this active rule has all parameters -->
<active_rules id="100" profile_id="1000" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="2012-01-01" updated_at="2012-01-01" />
+ created_at="2012-01-01" updated_at="2012-01-01"/>
<active_rule_parameters id="10000" active_rule_id="100" rules_parameter_id="1" rules_parameter_key="max" value="9"/>
<active_rule_parameters id="10001" active_rule_id="100" rules_parameter_id="2" rules_parameter_key="min" value="4"/>
<!-- this active rule does not have parameters. UPDATED_AT CHANGED -->
<active_rules id="101" profile_id="1000" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="2012-01-01" updated_at="2014-04-28" />
+ created_at="2012-01-01" updated_at="2014-04-28"/>
<!-- newly created -->
<active_rule_parameters id="10002" active_rule_id="101" rules_parameter_id="1" rules_parameter_key="max" value="10"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/before.xml
index b8914e48276..df5d8fa0bbd 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/before.xml
@@ -1,17 +1,17 @@
<dataset>
<!-- with default value -->
- <rules_parameters id="1" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]" />
+ <rules_parameters id="1" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]"/>
<!-- without default value, to be ignored -->
- <rules_parameters id="2" rule_id="10" name="min" param_type="INT" default_value="[null]" description="[null]" />
+ <rules_parameters id="2" rule_id="10" name="min" param_type="INT" default_value="[null]" description="[null]"/>
<!-- this active rule has all parameters -->
<active_rules id="100" profile_id="1000" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="2012-01-01" updated_at="2012-01-01" />
+ created_at="2012-01-01" updated_at="2012-01-01"/>
<active_rule_parameters id="10000" active_rule_id="100" rules_parameter_id="1" rules_parameter_key="max" value="9"/>
<active_rule_parameters id="10001" active_rule_id="100" rules_parameter_id="2" rules_parameter_key="min" value="4"/>
<!-- this active rule does not have parameters -->
<active_rules id="101" profile_id="1000" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="2012-01-01" updated_at="2012-01-01" />
+ created_at="2012-01-01" updated_at="2012-01-01"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/no_changes.xml b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/no_changes.xml
index d6fd3bd4100..fdd7750955e 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/no_changes.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/no_changes.xml
@@ -1,10 +1,10 @@
<dataset>
<!-- with default value -->
- <rules_parameters id="1" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]" />
+ <rules_parameters id="1" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]"/>
<!-- this active rule has all parameters -->
<active_rules id="100" profile_id="1000" rule_id="10" failure_level="3" inheritance="[null]"
- created_at="2012-01-01" updated_at="2012-01-01" />
+ created_at="2012-01-01" updated_at="2012-01-01"/>
<active_rule_parameters id="10000" active_rule_id="100" rules_parameter_id="1" rules_parameter_key="max" value="9"/>
<active_rule_parameters id="10001" active_rule_id="100" rules_parameter_id="2" rules_parameter_key="min" value="4"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/schema.sql
index ebb574482c3..ebb574482c3 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/AddMissingRuleParameterDefaultValuesMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v45/AddMissingRuleParameterDefaultValuesMigrationTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/before.xml
index 224c28d5fab..14e559f4a12 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/before.xml
@@ -1,23 +1,34 @@
<dataset>
- <metrics id="1" name="quality_profiles" VAL_TYPE="DATA" DESCRIPTION="[null]" domain="[null]" short_name=""
- enabled="[true]" worst_value="0" optimized_best_value="[true]" best_value="100" direction="1" hidden="[false]" delete_historical_data="[null]"/>
+ <metrics id="1" name="quality_profiles" VAL_TYPE="DATA" DESCRIPTION="[null]" domain="[null]" short_name=""
+ enabled="[true]" worst_value="0" optimized_best_value="[true]" best_value="100" direction="1"
+ hidden="[false]" delete_historical_data="[null]"/>
<!-- old format, references a numeric value which is profile id -->
<project_measures id="1" VALUE="60" METRIC_ID="1" SNAPSHOT_ID="1001" alert_text="[null]" RULES_CATEGORY_ID="[null]"
RULE_ID="[null]" text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]" rule_priority="[null]" characteristic_id="[null]" url="[null]"
- variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"/>
+ alert_status="[null]" description="[null]" rule_priority="[null]" characteristic_id="[null]"
+ url="[null]"
+ variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]" variation_value_5="[null]"/>
<!-- new format, json data -->
- <project_measures id="2" VALUE="[null]" text_value="{json}" METRIC_ID="1" SNAPSHOT_ID="1001" alert_text="[null]" RULES_CATEGORY_ID="[null]"
+ <project_measures id="2" VALUE="[null]" text_value="{json}" METRIC_ID="1" SNAPSHOT_ID="1001" alert_text="[null]"
+ RULES_CATEGORY_ID="[null]"
RULE_ID="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
- alert_status="[null]" description="[null]" rule_priority="[null]" characteristic_id="[null]" url="[null]"
- variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]" variation_value_5="[null]"/>
+ alert_status="[null]" description="[null]" rule_priority="[null]" characteristic_id="[null]"
+ url="[null]"
+ variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+ variation_value_4="[null]" variation_value_5="[null]"/>
<!-- last snapshot -->
- <snapshots purge_status="[null]" id="1001" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
- scope="PRJ" qualifier="TRK" created_at="2009-11-01 13:58:00.00" build_date="2009-11-01 13:58:00.00" version="[null]" path=""
+ <snapshots purge_status="[null]" id="1001" project_id="1" parent_snapshot_id="[null]" root_project_id="1"
+ root_snapshot_id="[null]"
+ scope="PRJ" qualifier="TRK" created_at="2009-11-01 13:58:00.00" build_date="2009-11-01 13:58:00.00"
+ version="[null]" path=""
status="P" islast="[true]" depth="0"
- period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]"
- period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" />
+ period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]"
+ period2_param="[null]" period2_date="[null]"
+ period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]"
+ period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]"
+ period5_date="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/schema.sql
index 912fd080b0d..912fd080b0d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v45/DeleteMeasuresOnDeletedProfilesMigrationTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute-result.xml
index a4b4ab4411b..0e6a35407d8 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute-result.xml
@@ -1,31 +1,35 @@
<dataset>
<!-- Template rule -->
- <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint" description="Architectural constraint" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint"
+ description="Architectural constraint" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[true]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]" />
- <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]" />
- <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]" />
+ <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]"/>
+ <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]"/>
+ <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]"/>
<!-- Custom rule, 2 parameters should be added -->
- <rules id="2" plugin_rule_key="ArchitecturalConstraint_2" plugin_name="xoo" name="Architectural constraint 2" description="Architectural constraint 2" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="2" plugin_rule_key="ArchitecturalConstraint_2" plugin_name="xoo" name="Architectural constraint 2"
+ description="Architectural constraint 2" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[false]" template_id="1" created_at="2014-01-01" updated_at="2014-10-09"/>
- <rules_parameters id="5" rule_id="2" name="max" param_type="INT" default_value="10" description="[null]" />
- <rules_parameters id="6" rule_id="2" name="format" param_type="STRING" default_value="csv" description="[null]" />
- <rules_parameters id="7" rule_id="2" name="type" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="8" rule_id="2" name="param" param_type="STRING" default_value="[null]" description="[null]" />
+ <rules_parameters id="5" rule_id="2" name="max" param_type="INT" default_value="10" description="[null]"/>
+ <rules_parameters id="6" rule_id="2" name="format" param_type="STRING" default_value="csv" description="[null]"/>
+ <rules_parameters id="7" rule_id="2" name="type" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="8" rule_id="2" name="param" param_type="STRING" default_value="[null]" description="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute.xml
index 58b9732cf61..a951abd43de 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute.xml
@@ -1,29 +1,33 @@
<dataset>
<!-- Template rule -->
- <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint" description="Architectural constraint" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint"
+ description="Architectural constraint" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[true]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]" />
- <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]" />
- <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]" />
+ <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]"/>
+ <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]"/>
+ <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]"/>
<!-- Custom rule, 2 parameters are existing, 2 parameters should be added -->
- <rules id="2" plugin_rule_key="ArchitecturalConstraint_2" plugin_name="xoo" name="Architectural constraint 2" description="Architectural constraint 2" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="2" plugin_rule_key="ArchitecturalConstraint_2" plugin_name="xoo" name="Architectural constraint 2"
+ description="Architectural constraint 2" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[false]" template_id="1" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="5" rule_id="2" name="max" param_type="INT" default_value="10" description="[null]" />
- <rules_parameters id="6" rule_id="2" name="format" param_type="STRING" default_value="csv" description="[null]" />
+ <rules_parameters id="5" rule_id="2" name="max" param_type="INT" default_value="10" description="[null]"/>
+ <rules_parameters id="6" rule_id="2" name="format" param_type="STRING" default_value="csv" description="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter-result.xml
index 76c7c186008..ae74ca8fbe3 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter-result.xml
@@ -1,31 +1,35 @@
<dataset>
<!-- Template rule -->
- <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint" description="Architectural constraint" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint"
+ description="Architectural constraint" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[true]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]" />
- <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]" />
- <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]" />
+ <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]"/>
+ <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]"/>
+ <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]"/>
<!-- Custom rule, 0 parameter are existing, 4 parameters should be added -->
- <rules id="3" plugin_rule_key="ArchitecturalConstraint_3" plugin_name="xoo" name="Architectural constraint 3" description="Architectural constraint 3" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="3" plugin_rule_key="ArchitecturalConstraint_3" plugin_name="xoo" name="Architectural constraint 3"
+ description="Architectural constraint 3" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[false]" template_id="1" created_at="2014-01-01" updated_at="2014-10-09"/>
- <rules_parameters id="5" rule_id="3" name="max" param_type="INT" default_value="[null]" description="[null]" />
- <rules_parameters id="6" rule_id="3" name="format" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="7" rule_id="3" name="type" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="8" rule_id="3" name="param" param_type="STRING" default_value="[null]" description="[null]" />
+ <rules_parameters id="5" rule_id="3" name="max" param_type="INT" default_value="[null]" description="[null]"/>
+ <rules_parameters id="6" rule_id="3" name="format" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="7" rule_id="3" name="type" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="8" rule_id="3" name="param" param_type="STRING" default_value="[null]" description="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter.xml
index dd676e5d869..ae7a8443d9a 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/execute_when_custom_rule_have_no_parameter.xml
@@ -1,22 +1,26 @@
<dataset>
<!-- Template rule -->
- <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint" description="Architectural constraint" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="1" plugin_rule_key="ArchitecturalConstraint" plugin_name="xoo" name="Architectural constraint"
+ description="Architectural constraint" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[true]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]" />
- <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]" />
- <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]" />
- <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]" />
+ <rules_parameters id="1" rule_id="1" name="max" param_type="INT" default_value="10" description="[null]"/>
+ <rules_parameters id="2" rule_id="1" name="format" param_type="STRING" default_value="txt" description="[null]"/>
+ <rules_parameters id="3" rule_id="1" name="type" param_type="STRING" default_value="[null]" description="[null]"/>
+ <rules_parameters id="4" rule_id="1" name="param" param_type="STRING" default_value="" description="[null]"/>
<!-- Custom rule, 0 parameter are existing, 4 parameters should be added -->
- <rules id="3" plugin_rule_key="ArchitecturalConstraint_3" plugin_name="xoo" name="Architectural constraint 3" description="Architectural constraint 3" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="3" plugin_rule_key="ArchitecturalConstraint_3" plugin_name="xoo" name="Architectural constraint 3"
+ description="Architectural constraint 3" status="READY" priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/no_changes.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/no_changes.xml
index ed072ad9461..53ad673ec69 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/no_changes.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/no_changes.xml
@@ -1,25 +1,29 @@
<dataset>
<!-- Template rule -->
- <rules id="10" plugin_rule_key="Rule2" plugin_name="xoo" name="Rule2" description="Rule2" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="10" plugin_rule_key="Rule2" plugin_name="xoo" name="Rule2" description="Rule2" status="READY" priority="1"
+ language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[true]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="10" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]" />
+ <rules_parameters id="10" rule_id="10" name="max" param_type="INT" default_value="10" description="[null]"/>
<!-- Custom rule, no parameter should be added -->
- <rules id="11" plugin_rule_key="Rule2_2" plugin_name="xoo" name="Rule2_2" description="Rule2_2" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
+ <rules id="11" plugin_rule_key="Rule2_2" plugin_name="xoo" name="Rule2_2" description="Rule2_2" status="READY"
+ priority="1" language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" tags="[null]" system_tags="[null]" plugin_config_key="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
remediation_coeff="[null]" default_remediation_coeff="[null]"
remediation_offset="[null]" default_remediation_offset="[null]"
effort_to_fix_description="[null]"
is_template="[false]" template_id="10" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules_parameters id="11" rule_id="11" name="max" param_type="INT" default_value="10" description="[null]" />
+ <rules_parameters id="11" rule_id="11" name="max" param_type="INT" default_value="10" description="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/schema.sql
index 0bf38617681..0bf38617681 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/AddMissingCustomRuleParametersMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/AddMissingCustomRuleParametersMigrationTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/execute-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/execute-result.xml
index 49462b9bbcd..49462b9bbcd 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/execute-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/execute-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/execute.xml b/sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/execute.xml
index 415484745fb..415484745fb 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/execute.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/execute.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/schema.sql
index 336e2fd7f01..336e2fd7f01 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v451/DeleteUnescapedActivitiesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v451/DeleteUnescapedActivitiesTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml
new file mode 100644
index 00000000000..6810f0a5dfe
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-invalid-duplication.xml
@@ -0,0 +1,15 @@
+<dataset>
+
+ <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data=""
+ line_hashes=""
+ data_hash=""/>
+
+ <file_sources id="2" project_uuid="uuid-MyProject" file_uuid="uuid-MyFile.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data=",,,,,,,,,,,,,,,class Foo {&#13;&#10;,,,,,,,,,,,,,,, // Empty&#13;&#10;,,,,,,,,,,,,,,,}&#13;&#10;,,,,,,,,,,,,,,,&#13;&#10;"
+ line_hashes="6a19ce786467960a3a9b0d26383a464a&#10;aab2dbc5fdeaa80b050b1d049ede357c&#10;cbb184dd8e05c9709e5dcaedaa0495cf&#10;&#10;"
+ data_hash=""/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-scm.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-scm.xml
new file mode 100644
index 00000000000..fa4d6332c5b
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after-with-scm.xml
@@ -0,0 +1,15 @@
+<dataset>
+
+ <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data=""
+ line_hashes=""
+ data_hash=""/>
+
+ <file_sources id="2" project_uuid="uuid-MyProject" file_uuid="uuid-MyFile.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data="aef12a,alice,2014-04-25T12:34:56+0100,1,4,2,2,5,3,3,6,4,,,1,class Foo {&#13;&#10;abe465,bob,2014-07-25T12:34:56+0100,,,,,,,,,,,,2, // Empty&#13;&#10;afb789,carol,2014-03-23T12:34:56+0100,0,,,0,,,0,,,,,,}&#13;&#10;afb789,carol,2014-03-23T12:34:56+0100,,,,,,,,,,,,,&#13;&#10;"
+ line_hashes="6a19ce786467960a3a9b0d26383a464a&#10;aab2dbc5fdeaa80b050b1d049ede357c&#10;cbb184dd8e05c9709e5dcaedaa0495cf&#10;&#10;"
+ data_hash=""/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after.xml
new file mode 100644
index 00000000000..6810f0a5dfe
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/after.xml
@@ -0,0 +1,15 @@
+<dataset>
+
+ <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data=""
+ line_hashes=""
+ data_hash=""/>
+
+ <file_sources id="2" project_uuid="uuid-MyProject" file_uuid="uuid-MyFile.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data=",,,,,,,,,,,,,,,class Foo {&#13;&#10;,,,,,,,,,,,,,,, // Empty&#13;&#10;,,,,,,,,,,,,,,,}&#13;&#10;,,,,,,,,,,,,,,,&#13;&#10;"
+ line_hashes="6a19ce786467960a3a9b0d26383a464a&#10;aab2dbc5fdeaa80b050b1d049ede357c&#10;cbb184dd8e05c9709e5dcaedaa0495cf&#10;&#10;"
+ data_hash=""/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/before.xml
new file mode 100644
index 00000000000..065480f088d
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/before.xml
@@ -0,0 +1,134 @@
+<dataset>
+
+ <metrics id="1" name="revisions_by_line" description="[null]" direction="0" domain="SCM"
+ short_name="Revisions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="2" name="authors_by_line" description="[null]" direction="0" domain="SCM" short_name="Authors by line"
+ qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="3" name="last_commit_datetimes_by_line" description="[null]" direction="0" domain="SCM"
+ short_name="Last commit dates by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="4" name="coverage_line_hits_data" description="[null]" direction="0" domain="Test"
+ short_name="Coverage hits by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="5" name="conditions_by_line" description="[null]" direction="0" domain="Tests"
+ short_name="Conditions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="6" name="covered_conditions_by_line" description="[null]" direction="0" domain="Tests"
+ short_name="Covered conditions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="7" name="it_coverage_line_hits_data" description="[null]" direction="0" domain="Test"
+ short_name="Coverage hits by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="8" name="it_conditions_by_line" description="[null]" direction="0" domain="Tests"
+ short_name="Conditions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="9" name="it_covered_conditions_by_line" description="[null]" direction="0" domain="Tests"
+ short_name="Covered conditions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="10" name="overall_coverage_line_hits_data" description="[null]" direction="0" domain="Test"
+ short_name="Coverage hits by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="11" name="overall_conditions_by_line" description="[null]" direction="0" domain="Tests"
+ short_name="Conditions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="12" name="overall_covered_conditions_by_line" description="[null]" direction="0" domain="Tests"
+ short_name="Covered conditions by line" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+ <metrics id="13" name="duplications_data" description="[null]" direction="0" domain="Duplications"
+ short_name="Duplication data" qualitative="false" val_type="DATA"
+ user_managed="false" enabled="true" origin="JAV" worst_value="[null]" best_value="[null]"
+ optimized_best_value="[null]" hidden="[false]" delete_historical_data="false"/>
+
+ <projects id="1" uuid="uuid-MyProject" kee="MyProject" scope="PRJ" qualifier="TRK"/>
+ <projects id="2" uuid="uuid-prj" kee="MyProject:src/main/xoo/prj" scope="DIR" qualifier="DIR"/>
+ <projects id="3" uuid="uuid-MyFile.xoo" kee="MyProject:src/main/xoo/prj/MyFile.xoo" scope="FIL" qualifier="FIL"/>
+ <projects id="4" uuid="uuid-Migrated.xoo" kee="MyProject:src/main/xoo/prj/Migrated.xoo" scope="FIL" qualifier="FIL"/>
+
+ <snapshots id="1" project_id="1" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+ status="P" islast="[false]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ depth="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02" build_date="2011-09-29"
+ version="2.1-SNAPSHOT" path="1.2."/>
+ <snapshots id="2" project_id="1" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+ status="P" islast="[true]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ depth="1" scope="PRJ" qualifier="TRK" created_at="2008-12-02" build_date="2011-09-29"
+ version="2.1-SNAPSHOT" path="1.2."/>
+
+ <snapshots id="3" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
+ status="P" islast="[false]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ depth="1" scope="DIR" qualifier="DIR" created_at="2008-12-02" build_date="2011-09-29"
+ version="2.1-SNAPSHOT" path="1.2."/>
+ <snapshots id="4" project_id="2" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="2"
+ status="P" islast="[true]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ depth="1" scope="DIR" qualifier="DIR" created_at="2008-12-02" build_date="2011-09-29"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ version="2.1-SNAPSHOT" path="1.2."/>
+
+ <snapshots id="5" project_id="3" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
+ status="P" islast="[false]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ depth="1" scope="DIR" qualifier="DIR" created_at="2008-12-02" build_date="2011-09-29"
+ version="2.1-SNAPSHOT" path="1.2."/>
+ <snapshots id="6" project_id="3" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="2"
+ status="P" islast="[true]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ depth="1" scope="FIL" qualifier="FIL" created_at="2008-12-02" build_date="2011-09-29"
+ version="2.1-SNAPSHOT" path="1.2."/>
+
+ <snapshots id="7" project_id="4" parent_snapshot_id="5" root_project_id="1" root_snapshot_id="2"
+ status="P" islast="[true]" purge_status="1"
+ period1_mode="days1" period1_param="30" period1_date="2011-09-24"
+ period2_mode="days2" period2_param="31" period2_date="2011-09-25"
+ period3_mode="days3" period3_param="32" period3_date="2011-09-26"
+ period4_mode="days4" period4_param="33" period4_date="2011-09-27"
+ period5_mode="days5" period5_param="34" period5_date="2011-09-28"
+ depth="1" scope="FIL" qualifier="FIL" created_at="2008-12-02" build_date="2011-09-29"
+ version="2.1-SNAPSHOT" path="1.2."/>
+
+ <file_sources id="1" project_uuid="uuid-MyProject" file_uuid="uuid-Migrated.xoo" created_at="1416238020000"
+ updated_at="1414770242000"
+ data=""
+ line_hashes=""
+ data_hash=""/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/schema.sql
index 481ea89ba0a..481ea89ba0a 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedFileSourcesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedFileSourcesTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedIssueLongDatesTest/before.xml
index 4c77c6f6dd8..7f2e3baa257 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedIssueLongDatesTest/before.xml
@@ -48,7 +48,7 @@
UPDATED_AT_MS="1500000000000"
/>
- <!-- NULL dates -->
+ <!-- NULL dates -->
<issues id="3" kee="MISSINGDATES" resolution="OPEN" status="OPEN" severity="BLOCKER" manual_severity="[false]"
assignee="[null]"
author_login="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedIssueLongDatesTest/schema.sql
index 66c7d3a7a9f..66c7d3a7a9f 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/FeedIssueLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/FeedIssueLongDatesTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml
index 2007c328093..0b0dfa1d728 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/after.xml
@@ -1,20 +1,28 @@
<dataset>
- <projects id="1" kee="project" name="project" long_name="project" scope="PRJ" qualifier="TRK" root_id="[null]" description="[null]"
- enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="1" kee="project" name="project" long_name="project" scope="PRJ" qualifier="TRK" root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="123456789"/>
- <projects id="2" kee="view" name="View" long_name="View" scope="PRJ" qualifier="VW" root_id="[null]" description="[null]"
- enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="2" kee="view" name="View" long_name="View" scope="PRJ" qualifier="VW" root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="123456789"/>
<!-- File should not be updated -->
- <projects id="3" kee="file" name="File" long_name="File" scope="FIL" qualifier="CLA" root_id="[null]" description="[null]"
- enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="3" kee="file" name="File" long_name="File" scope="FIL" qualifier="CLA" root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="[null]"/>
- <projects id="4" kee="disabled" name="Disabled" long_name="Disabled" scope="PRJ" qualifier="TRK" root_id="1" description="[null]"
- enabled="false" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="4" kee="disabled" name="Disabled" long_name="Disabled" scope="PRJ" qualifier="TRK" root_id="1"
+ description="[null]"
+ enabled="false" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml
index 717580c2589..8cf83a39b03 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/before.xml
@@ -1,20 +1,28 @@
<dataset>
- <projects id="1" kee="project" name="project" long_name="project" scope="PRJ" qualifier="TRK" root_id="[null]" description="[null]"
- enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="1" kee="project" name="project" long_name="project" scope="PRJ" qualifier="TRK" root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="[null]"/>
- <projects id="2" kee="view" name="View" long_name="View" scope="PRJ" qualifier="VW" root_id="[null]" description="[null]"
- enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="2" kee="view" name="View" long_name="View" scope="PRJ" qualifier="VW" root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="[null]"/>
<!-- File should not be updated -->
- <projects id="3" kee="file" name="File" long_name="File" scope="FIL" qualifier="CLA" root_id="[null]" description="[null]"
- enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="3" kee="file" name="File" long_name="File" scope="FIL" qualifier="CLA" root_id="[null]"
+ description="[null]"
+ enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="[null]"/>
- <projects id="4" kee="disabled" name="Disabled" long_name="Disabled" scope="PRJ" qualifier="TRK" root_id="1" description="[null]"
- enabled="false" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
+ <projects id="4" kee="disabled" name="Disabled" long_name="Disabled" scope="PRJ" qualifier="TRK" root_id="1"
+ description="[null]"
+ enabled="false" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
created_at="2014-09-01" authorization_updated_at="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql
index e10b82bd90e..e10b82bd90e 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/InsertProjectsAuthorizationUpdatedAtMigrationTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml
index cff6eb31173..3ea725be763 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components.xml
@@ -4,8 +4,9 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -13,14 +14,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Core" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -28,14 +31,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
<!-- sub module -->
<projects id="3" root_id="2" kee="org.struts:struts-db" name="Struts Db"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Db" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -43,7 +48,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2."/>
<!-- directory -->
@@ -51,7 +57,8 @@
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="src/org/struts" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts"
+ created_at="2014-06-18"/>
<snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -59,15 +66,18 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3."/>
<!-- file -->
- <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="RequestContext.java" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" created_at="2014-06-18" />
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java" created_at="2014-06-18"/>
<snapshots id="5" project_id="5" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
@@ -76,7 +86,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3.4."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml
index c10e10949b5..e5f8a0223ed 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_components_without_uuid.xml
@@ -4,8 +4,9 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -13,14 +14,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- module with a snapshot having no islast=true -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Core" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[false]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -28,15 +31,18 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
<!-- file linked on a no more existing project -->
- <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="RequestContext.java" root_id="999"
description="[null]" deprecated_kee="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" created_at="2014-06-18" />
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java" created_at="2014-06-18"/>
<snapshots id="5" project_id="5" parent_snapshot_id="999" root_project_id="999" root_snapshot_id="999"
status="P" islast="[true]" purge_status="[null]"
@@ -45,7 +51,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3.4."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml
index d995fe3a7f7..68496498454 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_developer.xml
@@ -1,10 +1,12 @@
<dataset>
<!-- developer -->
- <projects id="1" kee="DEV:developer@company.net" name="developer@company.net" long_name="Developer" scope="PRJ" qualifier="DEV" root_id="[null]" description="[null]"
+ <projects id="1" kee="DEV:developer@company.net" name="developer@company.net" long_name="Developer" scope="PRJ"
+ qualifier="DEV" root_id="[null]" description="[null]"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path=""
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-09-01" />
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-09-01"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -12,15 +14,18 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="DEV" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="DEV" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- technical project -->
- <projects id="2" root_id="1" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:developer@company.net:org.struts:struts" name="Struts"
+ <projects id="2" root_id="1" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:developer@company.net:org.struts:struts"
+ name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="10" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="10" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -28,7 +33,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="1" scope="PRJ" qualifier="DEV_PRJ" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="1" scope="PRJ" qualifier="DEV_PRJ" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml
index fed87fc45a7..47998eecac3 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_disable_components.xml
@@ -4,8 +4,9 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -13,14 +14,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- removed module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Core" deprecated_kee="[null]"
- description="[null]" enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[false]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -28,14 +31,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
<!--removed sub module -->
<projects id="3" root_id="2" kee="org.struts:struts-db" name="Struts Db"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Db" deprecated_kee="[null]"
- description="[null]" enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
status="P" islast="[false]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -43,7 +48,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2."/>
<!-- removed directory -->
@@ -51,7 +57,8 @@
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="src/org/struts" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" created_at="2014-06-18" />
+ enabled="[false]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts"
+ created_at="2014-06-18"/>
<snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
status="P" islast="[false]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -59,15 +66,18 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3."/>
<!-- removed file -->
- <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="RequestContext.java" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" created_at="2014-06-18" />
+ enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java" created_at="2014-06-18"/>
<snapshots id="5" project_id="5" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="1"
status="P" islast="[false]" purge_status="[null]"
@@ -76,7 +86,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3.4."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml
index d1e8908bf04..89709dca85d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_library.xml
@@ -1,10 +1,12 @@
<dataset>
<!-- library -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="LIB" kee="org.hamcrest:hamcrest-library" name="org.hamcrest:hamcrest-library"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="LIB" kee="org.hamcrest:hamcrest-library"
+ name="org.hamcrest:hamcrest-library"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="[null]" long_name="org.hamcrest:hamcrest-library"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml
index 9e688d16451..c485cc06664 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_provisioned_project.xml
@@ -4,7 +4,8 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml
index 5a1a222a2ba..b3ae4868b4c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/migrate_view.xml
@@ -1,10 +1,12 @@
<dataset>
<!-- view -->
- <projects id="1" kee="view" name="View" long_name="View" scope="PRJ" qualifier="VW" root_id="[null]" description="[null]"
+ <projects id="1" kee="view" name="View" long_name="View" scope="PRJ" qualifier="VW" root_id="[null]"
+ description="[null]"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-09-01" />
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-09-01"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -12,14 +14,17 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="VW" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="VW" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- sub view -->
- <projects id="2" kee="subView" name="Sub View" long_name="Sub View" scope="PRJ" qualifier="SVW" root_id="1" description="[null]"
+ <projects id="2" kee="subView" name="Sub View" long_name="Sub View" scope="PRJ" qualifier="SVW" root_id="1"
+ description="[null]"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-09-01" />
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-09-01"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -27,15 +32,17 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="SVW" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="SVW" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
<!-- technical project -->
<projects id="3" root_id="1" scope="FIL" qualifier="TRK" kee="vieworg.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="10" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="10" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -43,7 +50,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="1" scope="FIL" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="1" scope="FIL" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_module_has_no_root_id.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_module_has_no_root_id.xml
index 809d310d05f..c0b7676303d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_module_has_no_root_id.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_module_has_no_root_id.xml
@@ -4,8 +4,9 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -13,14 +14,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- module with null root id (probably a project that became a module) -->
<projects id="2" root_id="[null]" kee="org.struts:struts-core" name="Struts Core"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Core" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -28,7 +31,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_project_has_two_active_snapshots.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_project_has_two_active_snapshots.xml
index 63db22438fe..e42d8158831 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_project_has_two_active_snapshots.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_fail_when_project_has_two_active_snapshots.xml
@@ -4,8 +4,9 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -13,7 +14,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
@@ -22,14 +24,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- module linked on second active snapshot of the project -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Core" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="10" root_project_id="1" root_snapshot_id="10"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -37,7 +41,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="10."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml
index 175bb7686ad..76b63671f12 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/not_migrate_already_migrated_components.xml
@@ -4,8 +4,9 @@
<projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
<snapshots id="1" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -13,14 +14,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path=""/>
<!-- module migrated -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core"
uuid="BCDE" project_uuid="ABCD" module_uuid="ABCD" module_uuid_path="ABCD"
scope="PRJ" qualifier="BRC" long_name="Struts Core" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="2" project_id="2" parent_snapshot_id="1" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -28,14 +31,16 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1."/>
<!-- sub module not migrated -->
<projects id="3" root_id="2" kee="org.struts:struts-db" name="Struts Db"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
scope="PRJ" qualifier="BRC" long_name="Struts Db" deprecated_kee="[null]"
- description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="2014-06-18" />
+ description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
+ created_at="2014-06-18"/>
<snapshots id="3" project_id="3" parent_snapshot_id="2" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -43,7 +48,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="PRJ" qualifier="BRC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2."/>
<!-- directory not migrated -->
@@ -51,7 +57,8 @@
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="src/org/struts" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts" created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="src/org/struts"
+ created_at="2014-06-18"/>
<snapshots id="4" project_id="4" parent_snapshot_id="3" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
period1_mode="[null]" period1_param="[null]" period1_date="[null]"
@@ -59,15 +66,18 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="DIR" qualifier="PAC" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3."/>
<!-- file not migrated -->
- <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects long_name="org.struts.RequestContext" id="5" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
name="RequestContext.java" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" created_at="2014-06-18" />
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java" created_at="2014-06-18"/>
<snapshots id="5" project_id="5" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="1"
status="P" islast="[true]" purge_status="[null]"
@@ -76,15 +86,18 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3.4."/>
<!-- removed file linked on module, migrated -->
- <projects long_name="org.struts.RequestContext2" id="6" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext2.java"
+ <projects long_name="org.struts.RequestContext2" id="6" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext2.java"
uuid="DCBA" project_uuid="ABCD" module_uuid="BCDE" module_uuid_path="ABCD.BCDE"
name="RequestContext.java" root_id="2"
description="[null]" deprecated_kee="[null]"
- enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java" created_at="2014-06-18" />
+ enabled="[false]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java" created_at="2014-06-18"/>
<snapshots id="6" project_id="6" parent_snapshot_id="4" root_project_id="1" root_snapshot_id="1"
status="P" islast="[false]" purge_status="[null]"
@@ -93,7 +106,8 @@
period3_mode="[null]" period3_param="[null]" period3_date="[null]"
period4_mode="[null]" period4_param="[null]" period4_date="[null]"
period5_mode="[null]" period5_param="[null]" period5_date="[null]"
- depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+ depth="[null]" scope="FIL" qualifier="CLA" created_at="2008-12-02 13:58:00.00"
+ build_date="2008-12-02 13:58:00.00"
version="[null]" path="1.2.3.4."/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/schema.sql
index c8fee3449dd..c8fee3449dd 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/PopulateProjectsUuidColumnsMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/PopulateProjectsUuidColumnsMigrationTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml
new file mode 100644
index 00000000000..2be1be35633
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute-result.xml
@@ -0,0 +1,33 @@
+<dataset>
+
+ <issue_filters
+ id="1"
+ name="No sort field"
+ user_login="stephane"
+ shared="[true]"
+ description="no not touch"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="2"
+ name="Has sort field"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|projectUuids=ABC"
+ created_at="2013-06-10"
+ updated_at="2014-10-29 00:00:00.0"/>
+
+ <issue_filters
+ id="3"
+ name="corner-case"
+ user_login="michael"
+ shared="[true]"
+ description="do not touch"
+ data="statuses=CLOSED|resort=true"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml
new file mode 100644
index 00000000000..e3fdb367e19
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/execute.xml
@@ -0,0 +1,33 @@
+<dataset>
+
+ <issue_filters
+ id="1"
+ name="No sort field"
+ user_login="stephane"
+ shared="[true]"
+ description="no not touch"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="2"
+ name="Has sort field"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|asc=true|projectUuids=ABC"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="3"
+ name="corner-case"
+ user_login="michael"
+ shared="[true]"
+ description="do not touch"
+ data="statuses=CLOSED|resort=true"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/schema.sql
index 0627153a62d..0627153a62d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/RemoveSortFieldFromIssueFiltersMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/RemoveSortFieldFromIssueFiltersMigrationTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml
new file mode 100644
index 00000000000..7f657ff712c
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated-result.xml
@@ -0,0 +1,43 @@
+<dataset>
+
+ <issue_filters
+ id="1"
+ name="Struts Issues"
+ user_login="stephane"
+ shared="[true]"
+ description="All issues of Struts"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="2"
+ name="Open issues"
+ user_login="michael"
+ shared="[false]"
+ description="All open issues"
+ data="statuses=OPEN"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="3"
+ name="Sonar Open issues"
+ user_login="michael"
+ shared="[true]"
+ description="All open issues on Sonar"
+ data="statuses=CLOSED|projectUuids=ABCD|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="4"
+ name="Bad component roots fields"
+ user_login="michael"
+ shared="[true]"
+ description="All open issues on Sonar"
+ data="statuses=CLOSED|projectUuids=|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml
new file mode 100644
index 00000000000..524a2bef4a7
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/do_not_execute_if_already_migrated.xml
@@ -0,0 +1,50 @@
+<dataset>
+
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+ description="the description" long_name="Apache Struts"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
+
+ <issue_filters
+ id="1"
+ name="Struts Issues"
+ user_login="stephane"
+ shared="[true]"
+ description="All issues of Struts"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="2"
+ name="Open issues"
+ user_login="michael"
+ shared="[false]"
+ description="All open issues"
+ data="statuses=OPEN"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="3"
+ name="Sonar Open issues"
+ user_login="michael"
+ shared="[true]"
+ description="All open issues on Sonar"
+ data="statuses=CLOSED|projectUuids=ABCD|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="4"
+ name="Bad component roots fields"
+ user_login="michael"
+ shared="[true]"
+ description="All open issues on Sonar"
+ data="statuses=CLOSED|projectUuids=|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml
new file mode 100644
index 00000000000..3d2bb6937e5
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute-result.xml
@@ -0,0 +1,63 @@
+<dataset>
+
+ <issue_filters
+ id="1"
+ name="Struts Issues"
+ user_login="stephane"
+ shared="[true]"
+ description="All issues of Struts"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2014-10-29"/>
+
+ <issue_filters
+ id="2"
+ name="Open issues"
+ user_login="michael"
+ shared="[false]"
+ description="All open issues"
+ data="statuses=OPEN"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="3"
+ name="Sonar Open issues"
+ user_login="michael"
+ shared="[true]"
+ description="All open issues on Sonar"
+ data="statuses=CLOSED|projectUuids=ABCD|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2014-10-29"/>
+
+ <issue_filters
+ id="4"
+ name="Bad component roots fields"
+ user_login="michael"
+ shared="[true]"
+ description="Bad component roots fields"
+ data="statuses=CLOSED||resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2014-10-29"/>
+
+ <issue_filters
+ id="5"
+ name="Linked on not existing file"
+ user_login="michael"
+ shared="[true]"
+ description="Linked on not existing file"
+ data="statuses=CLOSED||resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2014-10-29"/>
+
+ <issue_filters
+ id="6"
+ name="Empty data"
+ user_login="michael"
+ shared="[true]"
+ description="Empty data"
+ data="[null]"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml
new file mode 100644
index 00000000000..a952ef40542
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/execute.xml
@@ -0,0 +1,70 @@
+<dataset>
+
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+ description="the description" long_name="Apache Struts"
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
+
+ <issue_filters
+ id="1"
+ name="Struts Issues"
+ user_login="stephane"
+ shared="[true]"
+ description="All issues of Struts"
+ data="componentRoots=org.struts:struts"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="2"
+ name="Open issues"
+ user_login="michael"
+ shared="[false]"
+ description="All open issues"
+ data="statuses=OPEN"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="3"
+ name="Sonar Open issues"
+ user_login="michael"
+ shared="[true]"
+ description="All open issues on Sonar"
+ data="statuses=CLOSED|componentRoots=org.struts:struts|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="4"
+ name="Bad component roots fields"
+ user_login="michael"
+ shared="[true]"
+ description="Bad component roots fields"
+ data="statuses=CLOSED|componentRoots=|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="5"
+ name="Linked on not existing file"
+ user_login="michael"
+ shared="[true]"
+ description="Linked on not existing file"
+ data="statuses=CLOSED|componentRoots=unknown|resolution=FIXED"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <issue_filters
+ id="6"
+ name="Empty data"
+ user_login="michael"
+ shared="[true]"
+ description="Empty data"
+ data="[null]"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/schema.sql
index a1182dd7d46..a1182dd7d46 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v50/ReplaceIssueFiltersProjectKeyByUuidTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v50/ReplaceIssueFiltersProjectKeyByUuidTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddIssuesColumnsTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddIssuesColumnsTest/schema.sql
index 3e799c31508..3e799c31508 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddIssuesColumnsTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddIssuesColumnsTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml
new file mode 100644
index 00000000000..5df0387b5f8
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/do_nothing_when_already_migrated.xml
@@ -0,0 +1,73 @@
+<dataset>
+
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+ <characteristics id="2" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="3" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+ <characteristics id="4" kee="PORTABILITY_COMPLIANCE" name="Portability Compliance" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="5" kee="MAINTAINABILITY" name="Maintainability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="3" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+ <characteristics id="6" kee="MAINTAINABILITY_COMPLIANCE" name="Maintainability Compliance" parent_id="5"
+ rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="7" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4"
+ enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+ <characteristics id="8" kee="SECURITY_COMPLIANCE" name="Security Compliance" parent_id="7" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+
+ <characteristics id="9" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="5"
+ enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+ <characteristics id="10" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="9" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+ <characteristics id="11" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="9" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+ <characteristics id="12" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="9" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="13" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]"
+ characteristic_order="6" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-20"/>
+ <characteristics id="14" kee="EFFICIENCY_COMPLIANCE" name="Efficiency Compliance" parent_id="13" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="15" kee="CHANGEABILITY" name="Changeability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="7" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-20"/>
+ <characteristics id="16" kee="CHANGEABILITY_COMPLIANCE" name="Changeability Compliance" parent_id="15"
+ rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="17" kee="RELIABILITY" name="Reliability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="8" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-20"/>
+ <characteristics id="18" kee="RELIABILITY_COMPLIANCE" name="Reliability Compliance" parent_id="17" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="19" kee="TESTABILITY" name="Testability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="9" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-20"/>
+ <characteristics id="20" kee="TESTABILITY_COMPLIANCE" name="Testability Compliance" parent_id="19" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/empty.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/empty.xml
index 871dedcb5e9..871dedcb5e9 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/empty.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/empty.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml
new file mode 100644
index 00000000000..72521ba290d
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_as_characteristic.xml
@@ -0,0 +1,11 @@
+<dataset>
+
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="2" kee="REUSABILITY_COMPLIANCE" name="Compliance" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_under_wrong_characteristic.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_under_wrong_characteristic.xml
index 3dbfebd4153..62a08ca6f7c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_under_wrong_characteristic.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_compliance_already_exists_under_wrong_characteristic.xml
@@ -1,12 +1,15 @@
<dataset>
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="3" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="2" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="3" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="2" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2013-11-20"
updated_at="[null]"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_usability_exists_as_sub_characteristic.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_usability_exists_as_sub_characteristic.xml
index 70016cc2d9d..9db2b164d0d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/fail_if_usability_exists_as_sub_characteristic.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/fail_if_usability_exists_as_sub_characteristic.xml
@@ -1,9 +1,11 @@
<dataset>
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="2" kee="USABILITY" name="Usability" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="USABILITY" name="Usability" parent_id="1" rule_id="[null]" characteristic_order="[null]"
+ enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists-result.xml
index 4f596203e6d..62b66901fe8 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists-result.xml
@@ -1,30 +1,38 @@
<dataset>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]" characteristic_order="3" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="3" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- New characteristic 'Usability' is on the top (order 1) -->
- <characteristics id="3" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="3" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="1"
+ enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="4" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="4" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="5" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="5" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="6" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="6" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Reusability -->
- <characteristics id="7" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="7" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Portability -->
- <characteristics id="8" kee="PORTABILITY_COMPLIANCE" name="Portability Compliance" parent_id="2" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="8" kee="PORTABILITY_COMPLIANCE" name="Portability Compliance" parent_id="2" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists.xml
index 7ab9a9726ac..a8394be84fa 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/insert_usability_at_the_top_if_security_does_exists.xml
@@ -1,9 +1,11 @@
<dataset>
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate-result.xml
index 91f1c6ab778..b677f0f351a 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate-result.xml
@@ -1,74 +1,94 @@
<dataset>
- <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]" characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]" characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="3" kee="MAINTAINABILITY" name="Maintainability" parent_id="[null]" rule_id="[null]" characteristic_order="3" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="3" kee="MAINTAINABILITY" name="Maintainability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="3" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="4" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="4" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4"
+ enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="5" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]" characteristic_order="6" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="5" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]"
+ characteristic_order="6" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="6" kee="CHANGEABILITY" name="Changeability" parent_id="[null]" rule_id="[null]" characteristic_order="7" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="6" kee="CHANGEABILITY" name="Changeability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="7" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="7" kee="RELIABILITY" name="Reliability" parent_id="[null]" rule_id="[null]" characteristic_order="8" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="7" kee="RELIABILITY" name="Reliability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="8" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="8" kee="TESTABILITY" name="Testability" parent_id="[null]" rule_id="[null]" characteristic_order="9" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="8" kee="TESTABILITY" name="Testability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="9" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- New characteristic 'Usability' is after Security -->
- <characteristics id="9" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="5" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="9" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="5"
+ enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
<!-- New sub characteristics under Usability -->
- <characteristics id="10" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="9" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="10" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="9" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="11" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="9" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="11" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="9" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="12" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="9" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="12" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="9" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Reusability -->
- <characteristics id="13" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="13" kee="REUSABILITY_COMPLIANCE" name="Reusability Compliance" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Portability -->
- <characteristics id="14" kee="PORTABILITY_COMPLIANCE" name="Portability Compliance" parent_id="2" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="14" kee="PORTABILITY_COMPLIANCE" name="Portability Compliance" parent_id="2" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Maintainability -->
- <characteristics id="15" kee="MAINTAINABILITY_COMPLIANCE" name="Maintainability Compliance" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="15" kee="MAINTAINABILITY_COMPLIANCE" name="Maintainability Compliance" parent_id="3"
+ rule_id="[null]" characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Security -->
- <characteristics id="16" kee="SECURITY_COMPLIANCE" name="Security Compliance" parent_id="4" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="16" kee="SECURITY_COMPLIANCE" name="Security Compliance" parent_id="4" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Efficiency -->
- <characteristics id="17" kee="EFFICIENCY_COMPLIANCE" name="Efficiency Compliance" parent_id="5" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="17" kee="EFFICIENCY_COMPLIANCE" name="Efficiency Compliance" parent_id="5" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Changeability -->
- <characteristics id="18" kee="CHANGEABILITY_COMPLIANCE" name="Changeability Compliance" parent_id="6" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="18" kee="CHANGEABILITY_COMPLIANCE" name="Changeability Compliance" parent_id="6" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Reliability -->
- <characteristics id="19" kee="RELIABILITY_COMPLIANCE" name="Reliability Compliance" parent_id="7" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="19" kee="RELIABILITY_COMPLIANCE" name="Reliability Compliance" parent_id="7" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Testability -->
- <characteristics id="20" kee="TESTABILITY_COMPLIANCE" name="Testability Compliance" parent_id="8" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="20" kee="TESTABILITY_COMPLIANCE" name="Testability Compliance" parent_id="8" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate.xml
new file mode 100644
index 00000000000..52505623c3d
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/migrate.xml
@@ -0,0 +1,35 @@
+<dataset>
+
+ <characteristics id="1" kee="REUSABILITY" name="Reusability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="1" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="2" kee="PORTABILITY" name="Portability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="2" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="3" kee="MAINTAINABILITY" name="Maintainability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="3" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="4" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4"
+ enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="5" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]"
+ characteristic_order="5" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="6" kee="CHANGEABILITY" name="Changeability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="6" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="7" kee="RELIABILITY" name="Reliability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="7" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+ <characteristics id="8" kee="TESTABILITY" name="Testability" parent_id="[null]" rule_id="[null]"
+ characteristic_order="8" enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml
new file mode 100644
index 00000000000..81050d0ee0c
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/not_fail_if_some_deprecated_requirements_still_exists_in_db.xml
@@ -0,0 +1,19 @@
+<dataset>
+
+ <characteristics id="1" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="1"
+ enabled="[true]" created_at="2013-11-20"
+ updated_at="2013-11-22"/>
+ <characteristics id="2" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+ <characteristics id="3" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2013-11-20"
+ updated_at="[null]"/>
+ <characteristics id="4" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
+ created_at="2013-11-20" updated_at="[null]"/>
+
+ <characteristics id="5" kee="[null]" name="[null]" parent_id="3" rule_id="3" characteristic_order="[null]"
+ enabled="[true]" created_at="2013-11-20" updated_at="2013-11-22"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/schema.sql
index 98c025def6b..98c025def6b 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/update_usability_if_already_exists-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/update_usability_if_already_exists-result.xml
index 1b12df0872e..86851f3d471 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/update_usability_if_already_exists-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/update_usability_if_already_exists-result.xml
@@ -1,30 +1,38 @@
<dataset>
- <characteristics id="1" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4"
+ enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
<!-- Oder has changed : this characteristic is now one step lower -->
- <characteristics id="2" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]" characteristic_order="6" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]"
+ characteristic_order="6" enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- Usability is moved after Security -->
- <characteristics id="3" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="5" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="3" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="5"
+ enabled="[true]" created_at="2013-11-20"
updated_at="2015-02-15"/>
<!-- New sub characteristics under Usability -->
- <characteristics id="4" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="4" kee="USABILITY_ACCESSIBILITY" name="Accessibility" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="5" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="5" kee="USABILITY_EASE_OF_USE" name="Ease of Use" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
- <characteristics id="6" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="3" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="6" kee="USABILITY_COMPLIANCE" name="Usability Compliance" parent_id="3" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Security -->
- <characteristics id="7" kee="SECURITY_COMPLIANCE" name="Security Compliance" parent_id="1" rule_id="[null]" characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
+ <characteristics id="7" kee="SECURITY_COMPLIANCE" name="Security Compliance" parent_id="1" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]" created_at="2015-02-15"
updated_at="[null]"/>
<!-- New sub characteristic 'Compliance' under Efficiency -->
- <characteristics id="8" kee="EFFICIENCY_COMPLIANCE" name="Efficiency Compliance" parent_id="2" rule_id="[null]" characteristic_order="[null]" enabled="[true]"
+ <characteristics id="8" kee="EFFICIENCY_COMPLIANCE" name="Efficiency Compliance" parent_id="2" rule_id="[null]"
+ characteristic_order="[null]" enabled="[true]"
created_at="2015-02-15" updated_at="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/update_usability_if_already_exists.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/update_usability_if_already_exists.xml
index 33d901de062..2e75b7324e7 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/AddNewCharacteristicsTest/update_usability_if_already_exists.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/AddNewCharacteristicsTest/update_usability_if_already_exists.xml
@@ -1,13 +1,16 @@
<dataset>
- <characteristics id="1" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="1" kee="SECURITY" name="Security" parent_id="[null]" rule_id="[null]" characteristic_order="4"
+ enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
- <characteristics id="2" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]" characteristic_order="5" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="2" kee="EFFICIENCY" name="Efficiency" parent_id="[null]" rule_id="[null]"
+ characteristic_order="5" enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
<!-- Usability should be move after Security -->
- <characteristics id="3" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="6" enabled="[true]" created_at="2013-11-20"
+ <characteristics id="3" kee="USABILITY" name="Usability" parent_id="[null]" rule_id="[null]" characteristic_order="6"
+ enabled="[true]" created_at="2013-11-20"
updated_at="2013-11-22"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/before.xml
index 0a7b5aa0cf1..0a7b5aa0cf1 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/before.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/no_authors.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/no_authors.xml
index 3f2da7a6af2..3f2da7a6af2 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/no_authors.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/no_authors.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/schema.sql
index 8dbd8b01ea9..8dbd8b01ea9 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/CopyScmAccountsFromAuthorsToUsersTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/CopyScmAccountsFromAuthorsToUsersTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/before.xml
new file mode 100644
index 00000000000..c0d5b5e59ec
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/before.xml
@@ -0,0 +1,52 @@
+<dataset>
+ <!-- new migration -->
+ <analysis_reports
+ id="1"
+ project_key="123456789-987654321"
+ snapshot_id="123"
+ report_data="data-project"
+ report_status="WORKING"
+ created_at="2014-09-25"
+ updated_at="2014-09-24"
+ started_at="2014-09-23"
+ finished_at="2014-09-22"
+ created_at_ms="[null]"
+ updated_at_ms="[null]"
+ started_at_ms="[null]"
+ finished_at_ms="[null]"
+ />
+
+ <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
+ <analysis_reports
+ id="2"
+ project_key="123456789-987654321"
+ snapshot_id="123"
+ report_data="data-project"
+ report_status="WORKING"
+ created_at="2014-09-25"
+ updated_at="2014-09-24"
+ started_at="2014-09-23"
+ finished_at="2014-09-22"
+ created_at_ms="1500000000000"
+ updated_at_ms="1500000000000"
+ started_at_ms="1500000000000"
+ finished_at_ms="1500000000000"
+ />
+
+ <!-- NULL dates -->
+ <analysis_reports
+ id="3"
+ project_key="123456789-987654321"
+ snapshot_id="123"
+ report_data="data-project"
+ report_status="WORKING"
+ created_at="[null]"
+ updated_at="[null]"
+ started_at="[null]"
+ finished_at="[null]"
+ created_at_ms="[null]"
+ updated_at_ms="[null]"
+ started_at_ms="[null]"
+ finished_at_ms="[null]"
+ />
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/schema.sql
index c2187b6a747..c2187b6a747 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedAnalysisReportsLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedAnalysisReportsLongDatesTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/before.xml
new file mode 100644
index 00000000000..db9753d85be
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/before.xml
@@ -0,0 +1,28 @@
+<dataset>
+ <!-- new migration -->
+ <events
+ id="1"
+ created_at="2014-09-25"
+ created_at_ms="[null]"
+ event_date="2014-09-25"
+ event_date_ms="[null]"
+ />
+
+ <!-- re-entrant migration - ignore the ones that are already fed with new dates -->
+ <events
+ id="2"
+ created_at="2014-09-25"
+ created_at_ms="1500000000"
+ event_date="2014-09-25"
+ event_date_ms="1500000000"
+ />
+
+ <!-- NULL dates -->
+ <events
+ id="3"
+ created_at="[null]"
+ created_at_ms="[null]"
+ event_date="[null]"
+ event_date_ms="[null]"
+ />
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/schema.sql
index 71ac42d40ef..71ac42d40ef 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedEventsLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedEventsLongDatesTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/bad_data.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/bad_data.xml
index 1c700243126..b4e95d8a3ea 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/bad_data.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/bad_data.xml
@@ -1,7 +1,8 @@
<dataset>
- <file_sources id="1" project_uuid="PROJECT_UUID" file_uuid="FILE1_UUID" created_at="1416238020000" updated_at="1414770242000"
+ <file_sources id="1" project_uuid="PROJECT_UUID" file_uuid="FILE1_UUID" created_at="1416238020000"
+ updated_at="1414770242000"
data="&quot;missing_escape_end"
binary_data="[null]"
line_hashes=""
- data_hash="" />
+ data_hash=""/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/data.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/data.xml
index fe6020ae9bb..df9b36ac5a2 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/data.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/data.xml
@@ -1,22 +1,25 @@
<dataset>
<!-- has data -->
- <file_sources id="1" project_uuid="PROJECT_UUID" file_uuid="FILE1_UUID" created_at="1416238020000" updated_at="1414770242000"
+ <file_sources id="1" project_uuid="PROJECT_UUID" file_uuid="FILE1_UUID" created_at="1416238020000"
+ updated_at="1414770242000"
data="aef12a,alice,2014-04-25T12:34:56+0100,1,4,2,2,5,3,3,6,4,syntax_highlighting,symbol_refs,22,class Foo {&#13;&#10;abe465,bob,2014-07-25T12:34:56+0100,,,,,,,,,,,,2, // Empty&#13;&#10;afb789,carol,2014-03-23T12:34:56+0100,0,,,0,,,0,,,,,,}&#13;&#10;afb789,carol,2014-03-23T12:34:56+0100,,,,,,,,,,,,,&#13;&#10;"
binary_data="[null]"
line_hashes=""
- data_hash="" />
+ data_hash=""/>
<!-- empty fields in CSV -->
- <file_sources id="2" project_uuid="PROJECT_UUID" file_uuid="FILE2_UUID" created_at="1416238020000" updated_at="1414770242000"
+ <file_sources id="2" project_uuid="PROJECT_UUID" file_uuid="FILE2_UUID" created_at="1416238020000"
+ updated_at="1414770242000"
data=",,,,,,,,,,,,,,,&#10;,,,,,,,,,,,,,,,&#10;,,,,,,,,,,,,,,,&#10;,,,,,,,,,,,,,,,&#10;"
binary_data="[null]"
line_hashes=""
- data_hash="" />
+ data_hash=""/>
<!-- null CSV -->
- <file_sources id="3" project_uuid="PROJECT_UUID" file_uuid="FILE2_UUID" created_at="1416238020000" updated_at="1414770242000"
+ <file_sources id="3" project_uuid="PROJECT_UUID" file_uuid="FILE2_UUID" created_at="1416238020000"
+ updated_at="1414770242000"
data="[null]"
binary_data="[null]"
line_hashes=""
- data_hash="" />
+ data_hash=""/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/schema.sql
index 5649f795864..5649f795864 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedFileSourcesBinaryDataTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest/before.xml
index e8e59f0d053..e8e59f0d053 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest/before.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest/schema.sql
index 240e5cedf2d..240e5cedf2d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueChangesLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueChangesLongDatesTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/after-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/after-result.xml
index 61626354e1e..0422433b393 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/after-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/after-result.xml
@@ -7,7 +7,7 @@
action_plan_key="[null]" tags="[null]"
issue_creation_date="2013-05-18" issue_update_date="2013-05-18" issue_close_date="2013-05-18"
created_at="1500000000000" updated_at="1500000000000"
- />
+ />
<!-- re-entrant migration - ignore the issues that are already fed with uuids -->
<issues id="2" kee="DEF"
@@ -18,5 +18,5 @@
action_plan_key="[null]" tags="[null]"
issue_creation_date="2013-05-18" issue_update_date="2013-05-18" issue_close_date="2013-05-18"
created_at="1500000000000" updated_at="1500000000000"
- />
+ />
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/before.xml
index f8b2ed7d1ee..fbcd05d6875 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/before.xml
@@ -15,7 +15,7 @@
action_plan_key="[null]" tags="[null]"
issue_creation_date="2013-05-18" issue_update_date="2013-05-18" issue_close_date="2013-05-18"
created_at="1500000000000" updated_at="1500000000000"
- />
+ />
<!-- re-entrant migration - ignore the issues that are already fed with uuids -->
<issues id="2" kee="DEF"
@@ -26,5 +26,5 @@
action_plan_key="[null]" tags="[null]"
issue_creation_date="2013-05-18" issue_update_date="2013-05-18" issue_close_date="2013-05-18"
created_at="1500000000000" updated_at="1500000000000"
- />
+ />
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/schema.sql
index b7157762feb..b7157762feb 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueComponentUuidsTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueComponentUuidsTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/after-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/after-result.xml
index 329a3f58f48..329a3f58f48 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/after-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/after-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/before.xml
index 4abdbd6677d..63b14662f3d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/before.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/before.xml
@@ -1,7 +1,9 @@
<dataset>
- <rules id="10" plugin_rule_key="Rule1" plugin_name="xoo" name="Rule1" description="Rule1" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" plugin_config_key="[null]"
+ <rules id="10" plugin_rule_key="Rule1" plugin_name="xoo" name="Rule1" description="Rule1" status="READY" priority="1"
+ language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" plugin_config_key="[null]"
tags="tag3,tag4" system_tags="tag1,tag2"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
@@ -10,8 +12,10 @@
effort_to_fix_description="[null]"
is_template="[false]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules id="20" plugin_rule_key="Rule2" plugin_name="xoo" name="Rule2" description="Rule2" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" plugin_config_key="[null]"
+ <rules id="20" plugin_rule_key="Rule2" plugin_name="xoo" name="Rule2" description="Rule2" status="READY" priority="1"
+ language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" plugin_config_key="[null]"
tags="tag3,tag4" system_tags=""
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
@@ -20,8 +24,10 @@
effort_to_fix_description="[null]"
is_template="[false]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules id="30" plugin_rule_key="Rule3" plugin_name="xoo" name="Rule3" description="Rule3" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" plugin_config_key="[null]"
+ <rules id="30" plugin_rule_key="Rule3" plugin_name="xoo" name="Rule3" description="Rule3" status="READY" priority="1"
+ language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" plugin_config_key="[null]"
tags="[null]" system_tags="tag1,tag2"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
@@ -30,8 +36,10 @@
effort_to_fix_description="[null]"
is_template="[false]" template_id="[null]" created_at="2014-01-01" updated_at="2014-01-01"/>
- <rules id="40" plugin_rule_key="Rule4" plugin_name="xoo" name="Rule4" description="Rule4" status="READY" priority="1" language="xoo"
- note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]" description_format="HTML" plugin_config_key="[null]"
+ <rules id="40" plugin_rule_key="Rule4" plugin_name="xoo" name="Rule4" description="Rule4" status="READY" priority="1"
+ language="xoo"
+ note_data="[null]" note_user_login="[null]" note_created_at="[null]" note_updated_at="[null]"
+ description_format="HTML" plugin_config_key="[null]"
tags="[null]" system_tags="[null]"
characteristic_id="[null]" default_characteristic_id="[null]"
remediation_function="[null]" default_remediation_function="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/schema.sql
index a5ae2fca911..a5ae2fca911 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssueTagsTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssueTagsTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/before.xml
new file mode 100644
index 00000000000..be66fff5c0b
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/before.xml
@@ -0,0 +1,34 @@
+<dataset>
+ <!-- new migration -->
+ <issues
+ id="1"
+ issue_creation_date="2014-09-25"
+ issue_creation_date_ms="[null]"
+ issue_update_date="2014-09-25"
+ issue_update_date_ms="[null]"
+ issue_close_date="2014-09-25"
+ issue_close_date_ms="[null]"
+ />
+
+ <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
+ <issues
+ id="2"
+ issue_creation_date="2014-09-25"
+ issue_creation_date_ms="1500000000"
+ issue_update_date="2014-09-25"
+ issue_update_date_ms="1500000000"
+ issue_close_date="2014-09-25"
+ issue_close_date_ms="1500000000"
+ />
+
+ <!-- NULL dates -->
+ <issues
+ id="3"
+ issue_creation_date="[null]"
+ issue_creation_date_ms="[null]"
+ issue_update_date="[null]"
+ issue_update_date_ms="[null]"
+ issue_close_date="[null]"
+ issue_close_date_ms="[null]"
+ />
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/schema.sql
index ab749851864..ab749851864 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedIssuesLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedIssuesLongDatesTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/before.xml
new file mode 100644
index 00000000000..e90f89769b1
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/before.xml
@@ -0,0 +1,28 @@
+<dataset>
+ <!-- new migration -->
+ <manual_measures
+ id="1"
+ created_at="2014-09-25"
+ created_at_ms="[null]"
+ updated_at="2014-09-25"
+ updated_at_ms="[null]"
+ />
+
+ <!-- re-entrant migration - ignore the ones that are already fed with new dates -->
+ <manual_measures
+ id="2"
+ created_at="2014-09-25"
+ created_at_ms="1500000000"
+ updated_at="2014-09-25"
+ updated_at_ms="1500000000"
+ />
+
+ <!-- NULL dates -->
+ <manual_measures
+ id="3"
+ created_at="[null]"
+ created_at_ms="[null]"
+ updated_at="[null]"
+ updated_at_ms="[null]"
+ />
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/schema.sql
index c04fbbeb80e..c04fbbeb80e 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedManualMeasuresLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedManualMeasuresLongDatesTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/before.xml
new file mode 100644
index 00000000000..088fd0873f8
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/before.xml
@@ -0,0 +1,61 @@
+<dataset>
+ <!-- new migration -->
+ <snapshots
+ id="1"
+ project_id="1"
+ created_at="2014-09-25"
+ created_at_ms="[null]"
+ build_date="2014-09-25"
+ build_date_ms="[null]"
+ period1_date="2014-09-25"
+ period1_date_ms="[null]"
+ period2_date="2014-09-25"
+ period2_date_ms="[null]"
+ period3_date="2014-09-25"
+ period3_date_ms="[null]"
+ period4_date="2014-09-25"
+ period4_date_ms="[null]"
+ period5_date="2014-09-25"
+ period5_date_ms="[null]"
+ />
+
+ <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
+ <snapshots
+ id="2"
+ project_id="1"
+ created_at="2014-09-25"
+ created_at_ms="1500000000"
+ build_date="2014-09-25"
+ build_date_ms="1500000000"
+ period1_date="2014-09-25"
+ period1_date_ms="1500000000"
+ period2_date="2014-09-25"
+ period2_date_ms="1500000000"
+ period3_date="2014-09-25"
+ period3_date_ms="1500000000"
+ period4_date="2014-09-25"
+ period4_date_ms="1500000000"
+ period5_date="2014-09-25"
+ period5_date_ms="1500000000"
+ />
+
+ <!-- NULL dates -->
+ <snapshots
+ id="3"
+ project_id="1"
+ created_at="[null]"
+ created_at_ms="[null]"
+ build_date="[null]"
+ build_date_ms="[null]"
+ period1_date="[null]"
+ period1_date_ms="[null]"
+ period2_date="[null]"
+ period2_date_ms="[null]"
+ period3_date="[null]"
+ period3_date_ms="[null]"
+ period4_date="[null]"
+ period4_date_ms="[null]"
+ period5_date="[null]"
+ period5_date_ms="[null]"
+ />
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/schema.sql
index 318169c0787..318169c0787 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedSnapshotsLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedSnapshotsLongDatesTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/before.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/before.xml
new file mode 100644
index 00000000000..a4b16c1fcd2
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/before.xml
@@ -0,0 +1,26 @@
+<dataset>
+
+ <users id="1" login="user1" name="User1" active="[true]"
+ created_at="2014-05-12"
+ updated_at="2014-05-13"
+ CREATED_AT_MS="[null]"
+ UPDATED_AT_MS="[null]"
+ />
+
+ <!-- re-entrant migration - ignore the issues that are already fed with new dates -->
+ <users id="2" login="user2" name="User2" active="[true]"
+ created_at="2014-05-12"
+ updated_at="2014-05-13"
+ CREATED_AT_MS="1500000000000"
+ UPDATED_AT_MS="1500000000000"
+ />
+
+ <!-- NULL dates -->
+ <users id="3" login="user3" name="User3" active="[true]"
+ created_at="[null]"
+ updated_at="[null]"
+ CREATED_AT_MS="[null]"
+ UPDATED_AT_MS="[null]"
+ />
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/schema.sql
index ba24adf3a29..ba24adf3a29 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedUsersLongDatesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/FeedUsersLongDatesTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/migrate-result.xml
index 288bcf3cda9..66bbfaf90c1 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/migrate-result.xml
@@ -1,10 +1,14 @@
<dataset>
- <projects id="100" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="the description" long_name="Apache Struts"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+ <projects id="100" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ description="the description" long_name="Apache Struts"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ authorization_updated_at="123456789"/>
- <projects id="101" root_id="[null]" scope="PRJ" qualifier="BRC" kee="org.struts:struts-server" name="Struts Server" description="the description" long_name="Apache Struts Server"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+ <projects id="101" root_id="[null]" scope="PRJ" qualifier="BRC" kee="org.struts:struts-server" name="Struts Server"
+ description="the description" long_name="Apache Struts Server"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ authorization_updated_at="123456789"/>
<!-- Permissions on project -->
<user_roles id="1" user_id="200" resource_id="100" role="user"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/migrate.xml
index ed9d0ba4816..a209fcf9025 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/migrate.xml
@@ -1,12 +1,16 @@
<dataset>
<projects id="100" uuid="ABCD" module_uuid="[null]" project_uuid="ABCD" module_uuid_path=".ABCD." root_id="[null]"
- scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="the description" long_name="Apache Struts"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+ scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="the description"
+ long_name="Apache Struts"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ authorization_updated_at="123456789"/>
<projects id="101" uuid="BCDE" module_uuid="ABCD" project_uuid="ABCD" module_uuid_path=".ABCD.BCDE." root_id="100"
- scope="PRJ" qualifier="BRC" kee="org.struts:struts-server" name="Struts Server" description="the description" long_name="Apache Struts Server"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+ scope="PRJ" qualifier="BRC" kee="org.struts:struts-server" name="Struts Server"
+ description="the description" long_name="Apache Struts Server"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ authorization_updated_at="123456789"/>
<!-- Permissions on project -->
<user_roles id="1" user_id="200" resource_id="100" role="user"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/nothing_to_do_when_already_migrated.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/nothing_to_do_when_already_migrated.xml
index c967d3daa70..8a842e7a734 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/nothing_to_do_when_already_migrated.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/nothing_to_do_when_already_migrated.xml
@@ -1,10 +1,14 @@
<dataset>
- <projects id="100" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" description="the description" long_name="Apache Struts"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+ <projects id="100" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ description="the description" long_name="Apache Struts"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ authorization_updated_at="123456789"/>
- <projects id="101" root_id="[null]" scope="PRJ" qualifier="BRC" kee="org.struts:struts-server" name="Struts Server" description="the description" long_name="Apache Struts Server"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]" authorization_updated_at="123456789"/>
+ <projects id="101" root_id="[null]" scope="PRJ" qualifier="BRC" kee="org.struts:struts-server" name="Struts Server"
+ description="the description" long_name="Apache Struts Server"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ authorization_updated_at="123456789"/>
<!-- Permissions on project -->
<user_roles id="1" user_id="200" resource_id="100" role="user"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/schema.sql
index b291cf0beea..b291cf0beea 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RemovePermissionsOnModulesMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RemovePermissionsOnModulesMigrationTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml
new file mode 100644
index 00000000000..a3dc90896d3
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute-result.xml
@@ -0,0 +1,68 @@
+<dataset>
+
+ <!-- Not updated, no concerned field -->
+ <issue_filters
+ id="1"
+ name="No concerned field"
+ user_login="stephane"
+ shared="[true]"
+ description="no not touch"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <!-- Not updated, projectUuids is left as is -->
+ <issue_filters
+ id="2"
+ name="Has projects"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|asc=true|projectUuids=ABC"
+ created_at="2013-06-10"
+ updated_at="2013-06-10 00:00:00.0"/>
+
+ <!-- componentUuids replaced by fileUuids -->
+ <issue_filters
+ id="3"
+ name="Has components"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="fileUuids=ABC|statuses=OPEN|sort=SEVERITY|asc=true"
+ created_at="2013-06-10"
+ updated_at="2014-10-29 00:00:00.0"/>
+
+ <!-- componentRootUuids replaced by moduleUuids -->
+ <issue_filters
+ id="4"
+ name="Has componentRoots"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|asc=true|moduleUuids=ABC"
+ created_at="2013-06-10"
+ updated_at="2014-10-29 00:00:00.0"/>
+
+ <!-- componentRootUuids replaced by moduleUuids (in the middle of the string) -->
+ <issue_filters
+ id="5"
+ name="Has projects"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|moduleUuids=ABC|asc=true"
+ created_at="2013-06-10"
+ updated_at="2014-10-29 00:00:00.0"/>
+
+ <!-- componentUuidss replaced by fileUuids, componentRootUuids replaced by moduleUuids -->
+ <issue_filters
+ id="6"
+ name="Has all parameters"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|fileUuids=BCD|moduleUuids=ABC|projectUuids=CDE|asc=true"
+ created_at="2013-06-10"
+ updated_at="2014-10-29 00:00:00.0"/>
+</dataset>
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml
new file mode 100644
index 00000000000..971334c5066
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/execute.xml
@@ -0,0 +1,69 @@
+<dataset>
+
+ <!-- Not updated, no concerned field -->
+ <issue_filters
+ id="1"
+ name="No concerned field"
+ user_login="stephane"
+ shared="[true]"
+ description="no not touch"
+ data="projectUuids=ABCD"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <!-- Not updated, projectUuids is left as is -->
+ <issue_filters
+ id="2"
+ name="Has projects"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|asc=true|projectUuids=ABC"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <!-- componentUuids replaced by fileUuids -->
+ <issue_filters
+ id="3"
+ name="Has components"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="componentUuids=ABC|statuses=OPEN|sort=SEVERITY|asc=true"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <!-- componentRootUuids replaced by moduleUuids -->
+ <issue_filters
+ id="4"
+ name="Has componentRoots"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|asc=true|componentRootUuids=ABC"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <!-- componentRootUuids replaced by moduleUuids (in the middle of the string) -->
+ <issue_filters
+ id="5"
+ name="Has projects"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|componentRootUuids=ABC|asc=true"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+ <!-- componentUuidss replaced by fileUuids, componentRootUuids replaced by moduleUuids -->
+ <issue_filters
+ id="6"
+ name="Has all parameters"
+ user_login="michael"
+ shared="[false]"
+ description="to be updated"
+ data="statuses=OPEN|sort=SEVERITY|componentUuids=BCD|componentRootUuids=ABC|projectUuids=CDE|asc=true"
+ created_at="2013-06-10"
+ updated_at="2013-06-10"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/schema.sql
index 0627153a62d..0627153a62d 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/RenameComponentRelatedParamsInIssueFiltersMigrationTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml
index 86d58cac2e9..85f8eb4b928 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml
@@ -1,7 +1,8 @@
<dataset>
<!-- root project -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
@@ -22,7 +23,8 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- directory -->
- <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts" deprecated_kee="org.struts:struts-core:src/org/struts"
+ <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
+ deprecated_kee="org.struts:struts-core:src/org/struts"
uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
name="src/org/struts" long_name="org.struts"
description="[null]"
@@ -30,12 +32,14 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- file -->
- <projects id="5" root_id="3" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects id="5" root_id="3" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
deprecated_kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="HIJK" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
name="RequestContext.java" long_name="org.struts.RequestContext"
description="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- view -->
@@ -46,42 +50,48 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- sub-view -->
- <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+ <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team"
+ deprecated_kee="Platform_Team"
uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path=".MEAT.PLAT."
description="the description" long_name="Platform Team"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- view technical project - unchanged -->
- <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+ <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube"
+ deprecated_kee="Platform_Team:sonarqube"
uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
description="the description" long_name="Platform Team"
enabled="[true]" language="[null]" copy_resource_id="42" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- root project already has dots, appending itself -->
- <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample"
+ deprecated_kee="org.sonar:sample"
uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path=".WDOT."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- root project with module_uuid_path NULL -->
- <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample"
+ deprecated_kee="org.sonar:sample"
uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path=".DCBA."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- developer -->
- <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+ <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker"
+ deprecated_kee="DEV:anakin.skywalker"
uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=".VADR."
description="the description" long_name="Anakin Skywalker"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- developer technical project, with dots - unchanged -->
- <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+ <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor"
+ name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
description="the description" long_name="Executor Star Dreadnaught"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml
index 355ec9308e7..ede863b4724 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml
@@ -1,7 +1,8 @@
<dataset>
<!-- root project -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
@@ -22,7 +23,8 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- directory -->
- <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts" deprecated_kee="org.struts:struts-core:src/org/struts"
+ <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
+ deprecated_kee="org.struts:struts-core:src/org/struts"
uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path="ABCD.EFGH.FGHI"
name="src/org/struts" long_name="org.struts"
description="[null]"
@@ -30,12 +32,14 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- file -->
- <projects id="5" root_id="3" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects id="5" root_id="3" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
deprecated_kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="HIJK" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path="ABCD.EFGH.FGHI"
name="RequestContext.java" long_name="org.struts.RequestContext"
description="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- view -->
@@ -46,42 +50,48 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- sub-view -->
- <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+ <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team"
+ deprecated_kee="Platform_Team"
uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path="MEAT"
description="the description" long_name="Platform Team"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- view technical project, already has dots - unchanged -->
- <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+ <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube"
+ deprecated_kee="Platform_Team:sonarqube"
uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
description="the description" long_name="Platform Team"
enabled="[true]" language="[null]" copy_resource_id="42" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- root project already has dots, appending itself -->
- <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample"
+ deprecated_kee="org.sonar:sample"
uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path="."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- root project with module_uuid_path NULL -->
- <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample"
+ deprecated_kee="org.sonar:sample"
uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="[null]"
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- developer -->
- <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+ <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker"
+ deprecated_kee="DEV:anakin.skywalker"
uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Anakin Skywalker"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- developer technical project, with dots - unchanged -->
- <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+ <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor"
+ name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
description="the description" long_name="Executor Star Dreadnaught"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml
index 4455653fdfd..547192c2bbf 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml
@@ -1,7 +1,8 @@
<dataset>
<!-- root project -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
@@ -22,7 +23,8 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- directory -->
- <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts" deprecated_kee="org.struts:struts-core:src/org/struts"
+ <projects id="4" root_id="3" scope="DIR" qualifier="DIR" kee="org.struts:struts-core:src/org/struts"
+ deprecated_kee="org.struts:struts-core:src/org/struts"
uuid="GHIJ" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
name="src/org/struts" long_name="org.struts"
description="[null]"
@@ -30,12 +32,14 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- file -->
- <projects id="5" root_id="3" scope="FIL" qualifier="FIL" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ <projects id="5" root_id="3" scope="FIL" qualifier="FIL"
+ kee="org.struts:struts-core:src/org/struts/RequestContext.java"
deprecated_kee="org.struts:struts-core:src/org/struts/RequestContext.java"
uuid="HIJK" project_uuid="ABCD" module_uuid="FGHI" module_uuid_path=".ABCD.EFGH.FGHI."
name="RequestContext.java" long_name="org.struts.RequestContext"
description="[null]"
- enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
+ enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]"
+ path="src/org/struts/RequestContext.java"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- view -->
@@ -46,42 +50,48 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- sub-view -->
- <projects id="7" root_id="[null]" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+ <projects id="7" root_id="[null]" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team"
+ deprecated_kee="Platform_Team"
uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path=".MEAT.PLAT."
description="the description" long_name="Platform Team"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- view technical project, already has dots - unchanged -->
- <projects id="8" root_id="[null]" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+ <projects id="8" root_id="[null]" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube"
+ deprecated_kee="Platform_Team:sonarqube"
uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
description="the description" long_name="Platform Team"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- root project already has dots, appending itself -->
- <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample"
+ deprecated_kee="org.sonar:sample"
uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path=".WDOT."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- root project with module_uuid_path NULL -->
- <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+ <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample"
+ deprecated_kee="org.sonar:sample"
uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path=".DCBA."
description="the description" long_name="Sample"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- developer -->
- <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+ <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker"
+ deprecated_kee="DEV:anakin.skywalker"
uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=".VADR."
description="the description" long_name="Anakin Skywalker"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- developer technical project, with dots - unchanged -->
- <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+ <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor"
+ name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
description="the description" long_name="Executor Star Dreadnaught"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/schema.sql
index b7307a0902a..b7307a0902a 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v51/UpdateProjectsModuleUuidPathTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumnTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumnTest/schema.sql
index 6fa4c32a970..6fa4c32a970 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/AddManualMeasuresComponentUuidColumnTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/AddManualMeasuresComponentUuidColumnTest/schema.sql
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate-result.xml
new file mode 100644
index 00000000000..2f6d90c92cb
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate-result.xml
@@ -0,0 +1,6 @@
+<dataset>
+
+ <events id="1" name="1.0" resource_id="1" component_uuid="ABCD" snapshot_id="1000" category="Version"
+ event_date="1225630680000" created_at="1225630680000" description="" event_data="[null]"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate.xml
index 476fad9a85f..38cd3d20e3a 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/migrate.xml
@@ -1,11 +1,13 @@
<dataset>
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
- <events id="1" name="1.0" resource_id="1" component_uuid="[null]" snapshot_id="1000" category="Version" event_date="1225630680000" created_at="1225630680000" description="" event_data="[null]"/>
+ <events id="1" name="1.0" resource_id="1" component_uuid="[null]" snapshot_id="1000" category="Version"
+ event_date="1225630680000" created_at="1225630680000" description="" event_data="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/not_migrate_already_migrated_data.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/not_migrate_already_migrated_data.xml
index 7c0d6df26d3..afecdb23d15 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/not_migrate_already_migrated_data.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/not_migrate_already_migrated_data.xml
@@ -1,11 +1,13 @@
<dataset>
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
- <events id="1" name="1.0" resource_id="1" component_uuid="ABCD" snapshot_id="1000" category="Version" event_date="1225630680000" created_at="1225630680000" description="" event_data="[null]"/>
+ <events id="1" name="1.0" resource_id="1" component_uuid="ABCD" snapshot_id="1000" category="Version"
+ event_date="1225630680000" created_at="1225630680000" description="" event_data="[null]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/schema.sql
index e4ca540f2f2..e4ca540f2f2 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedEventsComponentUuidTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedEventsComponentUuidTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate-result.xml
index 3788fbf38ef..3788fbf38ef 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate-result.xml
diff --git a/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate.xml
new file mode 100644
index 00000000000..2282a9bb4c0
--- /dev/null
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/migrate.xml
@@ -0,0 +1,10 @@
+<dataset>
+
+ <file_sources id="1" project_uuid="project-1" file_uuid="file-1" data_type="[null]" created_at="123456789"
+ updated_at="456456456"/>
+ <file_sources id="2" project_uuid="project-2" file_uuid="file-2" data_type="SOURCE" created_at="123456789"
+ updated_at="456456456"/>
+ <file_sources id="3" project_uuid="project-3" file_uuid="file-3" data_type="[null]" created_at="123456789"
+ updated_at="456456456"/>
+
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/schema.sql
index 84eb7749817..84eb7749817 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedFileSourcesDataTypeTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedFileSourcesDataTypeTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/migrate-result.xml
index 2dd0252cb3c..2dd0252cb3c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/migrate-result.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/migrate.xml
index 2a36c383c69..2a36c383c69 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/migrate.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/schema.sql
index bc2c66dc238..bc2c66dc238 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedManualMeasuresComponentUuidTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedManualMeasuresComponentUuidTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/migrate-result.xml
index 026d2dbe83a..dd63f7edb36 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/migrate-result.xml
@@ -1,7 +1,9 @@
<dataset>
- <metrics id="1" user_managed="[true]" optimized_best_value="[false]" hidden="[false]" delete_historical_data="[false]" />
- <metrics id="2" user_managed="[false]" optimized_best_value="[true]" hidden="[true]" delete_historical_data="[true]" />
- <metrics id="3" user_managed="[false]" optimized_best_value="[false]" hidden="[false]" delete_historical_data="[false]"/>
+ <metrics id="1" user_managed="[true]" optimized_best_value="[false]" hidden="[false]"
+ delete_historical_data="[false]"/>
+ <metrics id="2" user_managed="[false]" optimized_best_value="[true]" hidden="[true]" delete_historical_data="[true]"/>
+ <metrics id="3" user_managed="[false]" optimized_best_value="[false]" hidden="[false]"
+ delete_historical_data="[false]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/migrate.xml
index 7fee0be9b77..7fee0be9b77 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/migrate.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/schema.sql
index d65487d7677..d65487d7677 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedMetricsBooleansTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedMetricsBooleansTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/migrate-result.xml
index f4c0e64e068..e46458a32e7 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/migrate-result.xml
@@ -1,15 +1,18 @@
<dataset>
<!-- root project -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- Both links now contains component uuid-->
- <project_links id="1" project_id="1" component_uuid="ABCD" link_type="homepage" name="Home" href="http://www.struts.org"/>
- <project_links id="2" project_id="1" component_uuid="ABCD" link_type="scm" name="Sources" href="https://github.com/Struts"/>
+ <project_links id="1" project_id="1" component_uuid="ABCD" link_type="homepage" name="Home"
+ href="http://www.struts.org"/>
+ <project_links id="2" project_id="1" component_uuid="ABCD" link_type="scm" name="Sources"
+ href="https://github.com/Struts"/>
<!-- module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
@@ -19,6 +22,7 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- Link now contains component uuid-->
- <project_links id="3" project_id="2" component_uuid="EFGH" link_type="scm" name="Sources" href="https://github.com/Struts/struts-core"/>
+ <project_links id="3" project_id="2" component_uuid="EFGH" link_type="scm" name="Sources"
+ href="https://github.com/Struts/struts-core"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/migrate.xml
index b7143fc55cf..a1de6ecdf02 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/migrate.xml
@@ -1,14 +1,17 @@
<dataset>
<!-- root project -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
- <project_links id="1" project_id="1" component_uuid="[null]" link_type="homepage" name="Home" href="http://www.struts.org"/>
- <project_links id="2" project_id="1" component_uuid="[null]" link_type="scm" name="Sources" href="https://github.com/Struts"/>
+ <project_links id="1" project_id="1" component_uuid="[null]" link_type="homepage" name="Home"
+ href="http://www.struts.org"/>
+ <project_links id="2" project_id="1" component_uuid="[null]" link_type="scm" name="Sources"
+ href="https://github.com/Struts"/>
<!-- module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
@@ -17,6 +20,7 @@
description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
- <project_links id="3" project_id="2" component_uuid="[null]" link_type="scm" name="Sources" href="https://github.com/Struts/struts-core"/>
+ <project_links id="3" project_id="2" component_uuid="[null]" link_type="scm" name="Sources"
+ href="https://github.com/Struts/struts-core"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/not_migrate_already_migrated_data.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/not_migrate_already_migrated_data.xml
index 08a42761a3c..fc7f64f6e9c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/not_migrate_already_migrated_data.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/not_migrate_already_migrated_data.xml
@@ -1,15 +1,18 @@
<dataset>
<!-- root project -->
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- Links already contains component uuid-->
- <project_links id="1" project_id="1" component_uuid="ABCD" link_type="homepage" name="Home" href="http://www.struts.org"/>
- <project_links id="2" project_id="1" component_uuid="ABCD" link_type="scm" name="Sources" href="https://github.com/Struts"/>
+ <project_links id="1" project_id="1" component_uuid="ABCD" link_type="homepage" name="Home"
+ href="http://www.struts.org"/>
+ <project_links id="2" project_id="1" component_uuid="ABCD" link_type="scm" name="Sources"
+ href="https://github.com/Struts"/>
<!-- module -->
<projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
@@ -19,6 +22,7 @@
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- Link already contains component uuid-->
- <project_links id="3" project_id="2" component_uuid="EFGH" link_type="scm" name="Sources" href="https://github.com/Struts/struts-core"/>
+ <project_links id="3" project_id="2" component_uuid="EFGH" link_type="scm" name="Sources"
+ href="https://github.com/Struts/struts-core"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/schema.sql
index f04590ffebd..f04590ffebd 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/FeedProjectLinksComponentUuidTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/FeedProjectLinksComponentUuidTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/migrate-result.xml
index 7c930e3c197..2a5da2677cc 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/migrate-result.xml
@@ -1,6 +1,7 @@
<dataset>
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
@@ -8,16 +9,16 @@
<!-- Default Java profile, will be set as default -->
<rules_profiles id="1" name="Java One" language="java" parent_kee="[null]" kee="java-one" is_default="[true]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<rules_profiles id="2" name="Java Two" language="java" parent_kee="[null]" kee="java-two" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<rules_profiles id="3" name="Php One" language="php" parent_kee="[null]" kee="php-one" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<rules_profiles id="4" name="Cobol One" language="cbl" parent_kee="[null]" kee="cobol-one" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<!-- Unmodified property -->
<properties id="1" prop_key="polop.palap" text_value="Untouched" resource_id="[null]" user_id="[null]"/>
@@ -25,4 +26,4 @@
<!-- Project 'Struts' uses profile 'Java Two', moved to association table -->
<project_qprofiles id="1" project_uuid="ABCD" profile_key="java-two"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/migrate.xml
index 3d3452fdcf8..98849222aa9 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/migrate.xml
@@ -1,6 +1,7 @@
<dataset>
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
@@ -8,16 +9,16 @@
<!-- Default Java profile, will be set as default -->
<rules_profiles id="1" name="Java One" language="java" parent_kee="[null]" kee="java-one" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<rules_profiles id="2" name="Java Two" language="java" parent_kee="[null]" kee="java-two" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<rules_profiles id="3" name="Php One" language="php" parent_kee="[null]" kee="php-one" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<rules_profiles id="4" name="Cobol One" language="cbl" parent_kee="[null]" kee="cobol-one" is_default="[false]"
- created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
+ created_at="[null]" updated_at="[null]" rules_updated_at="[null]"/>
<!-- Unmodified property -->
<properties id="1" prop_key="polop.palap" text_value="Untouched" resource_id="[null]" user_id="[null]"/>
@@ -31,10 +32,10 @@
<!-- Property on unknown language, will be ignored -->
<properties id="4" prop_key="sonar.profile.xoo" text_value="Xoo One" resource_id="[null]" user_id="[null]"/>
-<!-- Property on unknown profile, will be ignored -->
+ <!-- Property on unknown profile, will be ignored -->
<properties id="5" prop_key="sonar.profile.php" text_value="Php Two" resource_id="[null]" user_id="[null]"/>
<!-- Property on unknown project, will be ignored -->
<properties id="6" prop_key="sonar.profile.php" text_value="Php One" resource_id="2" user_id="[null]"/>
-</dataset> \ No newline at end of file
+</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/schema.sql
index 004569aacfe..004569aacfe 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/MoveProjectProfileAssociationTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/MoveProjectProfileAssociationTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/remove_libraries-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/remove_libraries-result.xml
index addefe75d64..8c9f5d38dfb 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/remove_libraries-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/remove_libraries-result.xml
@@ -1,6 +1,7 @@
<dataset>
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
@@ -8,9 +9,9 @@
<!-- Removed -->
<!--<projects id="2" root_id="[null]" scope="PRJ" qualifier="LIB" kee="org.hamcrest:hamcrest-library" name="org.hamcrest:hamcrest-library"-->
- <!--uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"-->
- <!--description="[null]" long_name="org.hamcrest:hamcrest-library"-->
- <!--enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"-->
- <!--created_at="2014-06-18" />-->
+ <!--uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"-->
+ <!--description="[null]" long_name="org.hamcrest:hamcrest-library"-->
+ <!--enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"-->
+ <!--created_at="2014-06-18" />-->
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/remove_libraries.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/remove_libraries.xml
index 8b51f549544..59392a2b98c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/remove_libraries.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/remove_libraries.xml
@@ -1,16 +1,19 @@
<dataset>
- <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
+ <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts"
+ deprecated_kee="org.struts:struts"
uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=""
description="the description" long_name="Apache Struts"
enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
<!-- Should be removed -->
- <projects id="2" root_id="[null]" scope="PRJ" qualifier="LIB" kee="org.hamcrest:hamcrest-library" name="org.hamcrest:hamcrest-library"
+ <projects id="2" root_id="[null]" scope="PRJ" qualifier="LIB" kee="org.hamcrest:hamcrest-library"
+ name="org.hamcrest:hamcrest-library"
uuid="[null]" project_uuid="[null]" module_uuid="[null]" module_uuid_path="[null]"
description="[null]" long_name="org.hamcrest:hamcrest-library"
- enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="[null]"
- created_at="2014-06-18" />
+ enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+ deprecated_kee="[null]"
+ created_at="2014-06-18"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/schema.sql
index b7307a0902a..b7307a0902a 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveComponentLibrariesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveComponentLibrariesTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component-result.xml
index 7daf13a7aa6..a103099ddf4 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component-result.xml
@@ -10,9 +10,11 @@
<projects id="21" uuid="SUB_MODULE_2" project_uuid="PROJECT" kee="org.struts:struts-data" enabled="[true]"/>
<!-- directories -->
- <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[true]"/>
+ <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[true]"/>
<!-- files -->
- <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]"/>
+ <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[true]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component.xml
index 9d04e8ae4d4..893efe4fd15 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_enable_component.xml
@@ -13,14 +13,19 @@
<projects id="22" uuid="SUB_MODULE_3" project_uuid="PROJECT" kee="org.struts:struts-data" enabled="[false]"/>
<!-- directories -->
- <projects id="30" uuid="DIRECTORY_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
+ <projects id="30" uuid="DIRECTORY_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
<!-- Only this component must be kept, as it's enabled -->
- <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[true]"/>
+ <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[true]"/>
<!-- files -->
<!-- Only this component must be kept, as it's enabled -->
- <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[true]"/>
- <projects id="41" uuid="FILE_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
- <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
+ <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[true]"/>
+ <projects id="41" uuid="FILE_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
+ <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_last_component-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_last_component-result.xml
index 1fd89af0889..cd86088d452 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_last_component-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_last_component-result.xml
@@ -10,9 +10,11 @@
<projects id="22" uuid="SUB_MODULE_3" project_uuid="PROJECT" kee="org.struts:struts-data" enabled="[false]"/>
<!-- directories -->
- <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
+ <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
<!-- files -->
- <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
+ <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_last_component.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_last_component.xml
index 45e6d0acc02..72f1bea892e 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/keep_last_component.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/keep_last_component.xml
@@ -13,14 +13,19 @@
<projects id="22" uuid="SUB_MODULE_3" project_uuid="PROJECT" kee="org.struts:struts-data" enabled="[false]"/>
<!-- directories -->
- <projects id="30" uuid="DIRECTORY_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
+ <projects id="30" uuid="DIRECTORY_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
<!-- Only this component must be kept, as it's the last one -->
- <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
+ <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
<!-- files -->
- <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
- <projects id="41" uuid="FILE_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
+ <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
+ <projects id="41" uuid="FILE_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
<!-- Only this component must be kept, as it's the last one -->
- <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
+ <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/migrate-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/migrate-result.xml
index 9b5eb5e857b..75d7c73b2f6 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/migrate-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/migrate-result.xml
@@ -14,10 +14,12 @@
<issues id="22" component_uuid="SUB_MODULE_2" project_uuid="PROJECT"/>
<!-- removed directory -->
- <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
+ <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
<!-- removed file -->
- <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
+ <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
<issues id="40" component_uuid="FILE_3" project_uuid="PROJECT"/>
<issues id="41" component_uuid="FILE_3" project_uuid="PROJECT"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/migrate.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/migrate.xml
index 84d3de065fc..e4a4ea22046 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/migrate.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/migrate.xml
@@ -17,13 +17,18 @@
<issues id="22" component_uuid="SUB_MODULE_2" project_uuid="PROJECT"/>
<!-- disabled directories, only one should be kept -->
- <projects id="30" uuid="DIRECTORY_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
- <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts" enabled="[false]"/>
+ <projects id="30" uuid="DIRECTORY_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
+ <projects id="31" uuid="DIRECTORY_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts"
+ enabled="[false]"/>
<!-- disabled files -> only one should be kept and issue from removed one should be attached to the remaining one -->
- <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
- <projects id="41" uuid="FILE_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
- <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java" enabled="[false]"/>
+ <projects id="40" uuid="FILE_1" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
+ <projects id="41" uuid="FILE_2" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
+ <projects id="42" uuid="FILE_3" project_uuid="PROJECT" kee="org.struts:struts-core:src/org/struts/RequestContext.java"
+ enabled="[false]"/>
<issues id="40" component_uuid="FILE_1" project_uuid="PROJECT"/>
<issues id="41" component_uuid="FILE_3" project_uuid="PROJECT"/>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/schema.sql
index 19915dfd3b0..19915dfd3b0 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveDuplicatedComponentKeysTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveDuplicatedComponentKeysTest/schema.sql
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/remove_libraries-result.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/remove_libraries-result.xml
index a3a215e600c..d9ebf91906c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/remove_libraries-result.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/remove_libraries-result.xml
@@ -12,13 +12,13 @@
<!-- Removed -->
<!--<snapshots id="10" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]"-->
- <!--status="P" islast="[false]" purge_status="[null]"-->
- <!--period1_mode="[null]" period1_param="[null]" period1_date="[null]"-->
- <!--period2_mode="[null]" period2_param="[null]" period2_date="[null]"-->
- <!--period3_mode="[null]" period3_param="[null]" period3_date="[null]"-->
- <!--period4_mode="[null]" period4_param="[null]" period4_date="[null]"-->
- <!--period5_mode="[null]" period5_param="[null]" period5_date="[null]"-->
- <!--depth="[null]" scope="PRJ" qualifier="LIB" created_at="1228136280000" build_date="1228136280000"-->
- <!--version="[null]" path=""/>-->
+ <!--status="P" islast="[false]" purge_status="[null]"-->
+ <!--period1_mode="[null]" period1_param="[null]" period1_date="[null]"-->
+ <!--period2_mode="[null]" period2_param="[null]" period2_date="[null]"-->
+ <!--period3_mode="[null]" period3_param="[null]" period3_date="[null]"-->
+ <!--period4_mode="[null]" period4_param="[null]" period4_date="[null]"-->
+ <!--period5_mode="[null]" period5_param="[null]" period5_date="[null]"-->
+ <!--depth="[null]" scope="PRJ" qualifier="LIB" created_at="1228136280000" build_date="1228136280000"-->
+ <!--version="[null]" path=""/>-->
</dataset>
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/remove_libraries.xml b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/remove_libraries.xml
index 3cba1535e62..3cba1535e62 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/remove_libraries.xml
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/remove_libraries.xml
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/schema.sql b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/schema.sql
index 832463b246c..832463b246c 100644
--- a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/RemoveSnapshotLibrariesTest/schema.sql
+++ b/sonar-db/src/test/resources/org/sonar/db/version/v52/RemoveSnapshotLibrariesTest/schema.sql