]> source.dussan.org Git - sonarqube.git/commit
SONAR-14335 Drop PK constraint by using select instead hardcoded name
authorJacek <jacek.poreda@sonarsource.com>
Mon, 18 Jan 2021 13:25:26 +0000 (14:25 +0100)
committerMalena Ebert <63863184+malena-ebert-sonarsource@users.noreply.github.com>
Tue, 26 Jan 2021 12:31:41 +0000 (13:31 +0100)
commit0dbe912f80e67d86ec0a0c87427d6bfd9fb26ed7
treed91e5ba52369cb173b443f8f4aa0176f624f80ae
parent1dd3039fd917b646bfdc807da1d16487477cedfc
SONAR-14335 Drop PK constraint by using select instead hardcoded name
- Move DropPrimaryKeySqlGenerator, AddPrimaryKeyBuilder and DbConstraintFinder to 'org.sonar.server.platform.db.migration.sql' package

(cherry picked from commit fdfd28395271746cff870a45f8d2968709ed738a)
115 files changed:
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/MigrationConfigurationModule.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/AddPrimaryKeyBuilder.java [new file with mode: 0644]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/DbPrimaryKeyConstraintFinder.java [new file with mode: 0644]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/DropConstraintBuilder.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/sql/DropPrimaryKeySqlGenerator.java [new file with mode: 0644]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v83/DropIdFromComponentsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/activeruleparameters/AddPrimaryKeyOnUuidColumnOfActiveRuleParametersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/activeruleparameters/DropPrimaryKeyOnIdColumnOfActiveRuleParametersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/activerules/AddPrimaryKeyOnUuidColumnOfActiveRulesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/activerules/DropPrimaryKeyOnIdColumnOfActiveRulesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/ceactivity/AddPrimaryKeyOnUuidColumnOfCeActivityTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/ceactivity/DropPrimaryKeyOnIdColumnOfCeActivityTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/cequeue/AddPrimaryKeyOnUuidColumnOfCeQueueTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/cequeue/DropPrimaryKeyOnIdColumnOfCeQueueTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/common/DropPrimaryKeyOnIdColumn.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/duplicationsindex/AddPrimaryKeyOnUuidColumnOfDuplicationsIndexTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/duplicationsindex/DropPrimaryKeyOnIdColumnOfDuplicationsIndexTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/events/AddPrimaryKeyOnUuidColumnOfEventsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/events/DropPrimaryKeyOnIdColumnOfEventsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/filesources/AddPrimaryKeyOnUuidColumnOfFileSourcesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/filesources/DropPrimaryKeyOnIdColumnOfFileSourcesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/grouproles/AddPrimaryKeyOnUuidColumnOfGroupRolesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/grouproles/DropPrimaryKeyOnIdColumnOfGroupRolesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/groups/AddPrimaryKeyOnUuidColumnOfGroupsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/groups/DropPrimaryKeyOnIdColumnOfGroupsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/issuechanges/AddPrimaryKeyOnUuidColumnOfIssueChangesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/issues/AddPrimaryKeyOnKeeColumnOfIssuesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/manualmeasures/AddPrimaryKeyOnUuidColumnOfManualMeasuresTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/manualmeasures/DropPrimaryKeyOnIdColumnOfManualMeasuresTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/metrics/AddPrimaryKeyOnUuidColumnOfMetricsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/metrics/DropPrimaryKeyOnIdColumnOfMetricsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/metrics/livemeasures/AddPKeyOnUuidOfLiveMeasuresTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/notifications/AddPrimaryKeyOnUuidColumnOfNotificationTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/notifications/DropPrimaryKeyOnIdColumnOfNotificationTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permissiontemplates/AddPrimaryKeyOnUuidColumnOfPermissionTemplatesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permissiontemplates/DropPrimaryKeyOnIdColumnOfPermissionTemplatesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permtemplatesgroups/AddPrimaryKeyOnUuidColumnOfPermTemplatesGroupsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permtemplatesgroups/DropPrimaryKeyOnIdColumnOfPermTemplatesGroupsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permtemplatesusers/AddPrimaryKeyOnUuidColumnOfPermTemplatesUsersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permtemplatesusers/DropPrimaryKeyOnIdColumnOfPermTemplatesUsersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permtplcharacteristics/AddPrimaryKeyOnUuidColumnOfPermTplCharacteristicsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/permtplcharacteristics/DropPrimaryKeyOnIdColumnOfPermTplCharacteristicsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/projectmeasures/AddPrimaryKeyOnUuidColumnOfProjectMeasuresTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/projectmeasures/DropPrimaryKeyOnIdColumnOfProjectMeasuresTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/projectqprofiles/AddPrimaryKeyOnUuidColumnOfProjectQProfilesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/projectqprofiles/DropPrimaryKeyOnIdColumnOfProjectQProfilesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/properties/AddPrimaryKeyOnUuidColumnOfPropertiesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/properties/DropPrimaryKeyOnIdColumnOfPropertiesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/qualitygateconditions/AddPrimaryKeyOnUuidColumnOfQualityGateConditionsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/qualitygateconditions/DropPrimaryKeyOnIdColumnOfQualityGateConditionsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/qualitygates/AddPrimaryKeyOnUuidColumnOfQGatesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/qualitygates/DropPrimaryKeyOnIdColumnOfQGatesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/AddPrimaryKeyOnUuidColumnOfRulesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/DropPrimaryKeyOnIdColumnOfRulesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/rulesmetadata/AddPrimaryKeyOnUuidAndOrganizationUuidColumnOfRulesMetadataTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rules/rulesmetadata/DropPrimaryKeyOnIdColumnOfRulesMetadataTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rulesparameters/AddPrimaryKeyOnUuidColumnOfRulesParametersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rulesparameters/DropPrimaryKeyOnIdColumnOfRulesParametersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rulesprofiles/AddPrimaryKeyOnUuidColumnOfRulesProfilesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/rulesprofiles/DropPrimaryKeyOnIdColumnOfRulesProfilesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/snapshots/issues/AddPrimaryKeyOnUuidColumnOfSnapshotsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/snapshots/issues/DropPrimaryKeyOnIdColumnOfSnapshotsTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/userroles/AddPrimaryKeyOnUuidColumnOfUserRolesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/userroles/DropPrimaryKeyOnIdColumnOfUserRolesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/users/AddPrimaryKeyOnUuidColumnOfUsersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/users/DropPrimaryKeyOnIdColumnOfUsersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/users/fk/organizationmembers/AddPrimaryKeyOnUserUuidAndOrganizationUuidColumnsOfUserRolesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/users/fk/organizationmembers/DropPrimaryKeyOnUserIdAndOrganizationUuidOfOrganizationMembersTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/usertokens/AddPrimaryKeyOnUuidColumnOfUserTokensTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/usertokens/DropPrimaryKeyOnIdColumnOfUserTokensTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/util/AddPrimaryKeyBuilder.java [deleted file]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v84/util/DropPrimaryKeySqlGenerator.java [deleted file]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v85/AddPrimaryKeyOnUuidForIssueChangesTable.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v86/AddPkToApplicationBranchProjs.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v86/AddPkToApplicationProjects.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v86/AddPrimaryKeyToDefaultQProfiles.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v86/DropDefaultQProfilesPk.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v86/DropOrganizationInRulesMetadata.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/AddPrimaryKeyBuilderTest.java [new file with mode: 0644]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/DbPrimaryKeyConstraintFinderTest.java [new file with mode: 0644]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/sql/DropPrimaryKeySqlGeneratorTest.java [new file with mode: 0644]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v83/DropIdFromComponentsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/activeruleparameters/DropPrimaryKeyOnIdColumnOfActiveRuleParametersTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/activerules/DropPrimaryKeyOnIdColumnOfActiveRulesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/ceactivity/DropPrimaryKeyOnIdColumnOfCeActivityTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/cequeue/DropPrimaryKeyOnIdColumnOfCeQueueTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/duplicationsindex/DropPrimaryKeyOnIdColumnOfDuplicationsIndexTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/events/DropPrimaryKeyOnIdColumnOfEventsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/filesources/DropPrimaryKeyOnIdColumnOfFileSourcesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/grouproles/DropPrimaryKeyOnIdColumnOfGroupRolesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/groups/DropPrimaryKeyOnIdColumnOfGroupsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/manualmeasures/DropPrimaryKeyOnIdColumnOfManualMeasuresTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/metrics/DropPrimaryKeyOnIdColumnOfMetricsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/notifications/DropPrimaryKeyOnIdColumnOfNotificationTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/permissiontemplates/DropPrimaryKeyOnIdColumnOfPermissionTemplatesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/permtemplatesgroups/DropPrimaryKeyOnIdColumnOfPermTemplatesGroupsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/permtemplatesusers/DropPrimaryKeyOnIdColumnOfPermTemplatesUsersTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/permtplcharacteristics/DropPrimaryKeyOnIdColumnOfPermTplCharacteristicsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/projectmeasures/DropPrimaryKeyOnIdColumnOfProjectMeasuresTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/projectqprofiles/DropPrimaryKeyOnIdColumnOfProjectQProfilesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/properties/DropPrimaryKeyOnIdColumnOfPropertiesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/qualitygateconditions/DropPrimaryKeyOnIdColumnOfQualityGateConditionsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/qualitygates/DropPrimaryKeyOnIdColumnOfQGatesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/rules/DropPrimaryKeyOnIdColumnOfRulesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/rules/rulesmetadata/DropPrimaryKeyOnIdColumnOfRulesMetadataTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/rulesparameters/DropPrimaryKeyOnIdColumnOfRulesParametersTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/rulesprofiles/DropPrimaryKeyOnIdColumnOfRulesProfilesTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/snapshots/DropPrimaryKeyOnIdColumnOfSnapshotsTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/users/DropPrimaryKeyOnIdColumnOfUsersTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/users/fk/organizationmembers/DropPrimaryKeyOnUserIdAndOrganizationUuidOfOrganizationMembersTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/usertokens/DropPrimaryKeyOnIdColumnOfUserTokensTableTest.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/util/AddPrimaryKeyBuilderTest.java [deleted file]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v84/util/DropPrimaryKeySqlGeneratorTest.java [deleted file]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v86/DropDefaultQProfilesPkTest.java
server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/sql/DbPrimaryKeyConstraintFinderTest/schema.sql [new file with mode: 0644]