3 * Copyright (C) 2009-2017 SonarSource SA
4 * mailto:info AT sonarsource DOT com
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 package org.sonar.server.platform.db.migration.version.v64;
23 import org.sonar.server.platform.db.migration.step.MigrationStepRegistry;
24 import org.sonar.server.platform.db.migration.version.DbVersion;
26 public class DbVersion64 implements DbVersion {
28 public void addSteps(MigrationStepRegistry registry) {
30 .add(1600, "Add PROJECTS.TAGS", AddTagsToProjects.class)
31 .add(1601, "Set PROJECTS.COPY_COMPONENT_UUID on local views", SetCopyComponentUuidOnLocalViews.class)
32 .add(1602, "Add RULES_PROFILES.ORGANIZATION_UUID", AddQualityProfileOrganizationUuid.class)
33 .add(1603, "Set RULES_PROFILES.ORGANIZATION_UUID to default", SetQualityProfileOrganizationUuidToDefault.class)
34 .add(1604, "Make RULES_PROFILES.ORGANIZATION_UUID not nullable", MakeQualityProfileOrganizationUuidNotNullable.class)
35 .add(1605, "Drop unique index on RULES_PROFILES.KEE", DropUniqueIndexOnQualityProfileKey.class)
36 .add(1606, "Make RULES_PROFILES.ORGANIZATION_UUID and KEE unique", MakeQualityProfileOrganizationUuidAndKeyUnique.class)
37 .add(1607, "Create ORGANIZATION_MEMBERS table", CreateOrganizationMembersTable.class)
38 .add(1608, "Populate ORGANIZATION_MEMBERS table", PopulateOrganizationMembersTable.class)
39 .add(1609, "Drop unique index on RULES_PROFILES.ORGANIZATION_UUID and KEE", DropUniqueIndexOnQualityProfileOrganizationUuidAndKey.class)
40 .add(1610, "Make RULES_PROFILES.KEE unique", MakeQualityProfileKeyUnique.class)
41 .add(1611, "Clean LOADED_TEMPLATES rows without type", CleanLoadedTemplateOrphans.class)
42 .add(1612, "Extend size of column LOADED_TEMPLATES.TEMPLATE_TYPE", ExtendLoadedTemplateTypeColumn.class)
43 .add(1613, "Add index LOADED_TEMPLATES_TYPE", AddIndexLoadedTemplatesType.class)
44 .add(1614, "Upgrade loaded template entries for quality profiles", UpgradeQualityTemplateLoadedTemplates.class)
45 .add(1615, "Create table RULES_METADATA", CreateRulesMetadata.class)
46 .add(1616, "Populate table RULES_METADATA", PopulateRulesMetadata.class)
47 .add(1617, "Drop metadata columns from RULES", DropMetadataColumnsFromRules.class)
48 // ensure the index is made unique even on existing 6.4-SNAPSHOT instances (such as next or the developer machines)
49 .add(1618, "Make index on ORGANIZATIONS.KEE unique", org.sonar.server.platform.db.migration.version.v63.MakeIndexOnOrganizationsKeeUnique.class)
50 .add(1619, "Restore 'sonar-users' group", RestoreSonarUsersGroups.class)
51 .add(1620, "Delete 'sonar.defaultGroup' setting", DeleteDefaultGroupSetting.class)
52 .add(1621, "Set all users into 'sonar-users' group", SetAllUsersIntoSonarUsersGroup.class)
53 .add(1622, "Create 'Members' group in each organization", CreateMembersGroupsInEachOrganization.class)
54 .add(1623, "Set organization members into 'Members' group", SetOrganizationMembersIntoMembersGroup.class)
55 .add(1624, "Add ORGANIZATIONS.DEFAULT_GROUP_ID", AddDefaultGroupIdToOrganizations.class)
56 .add(1625, "Populate column ORGANIZATIONS.DEFAULT_GROUP_ID", PopulateColumnDefaultGroupIdOfOrganizations.class)
57 .add(1626, "Clean orphan rows in table GROUPS_USERS", CleanOrphanRowsInGroupsUsers.class)
58 .add(1627, "Delete permission templates linked to removed users", DeletePermissionTemplatesLinkedToRemovedUsers.class)
59 .add(1628, "Add columns CE_QUEUE.WORKER_UUID and EXECUTION_COUNT", AddCeQueueWorkerUuidAndExecutionCount.class)
60 .add(1629, "Make CE_QUEUE.EXECUTION_COUNT not nullable", MakeCeQueueExecutionCountNotNullable.class)
61 .add(1630, "Add columns CE_ACTIVITY.WORKER_UUID and EXECUTION_COUNT", AddCeActivityWorkerUuidAndExecutionCount.class)
62 .add(1631, "Make columns CE_ACTIVITY.EXECUTION_COUNT not nullable", MakeCeActivityExecutionCountNotNullable.class)
63 .add(1632, "Make PROJECTS.PROJECT_UUID not nullable", MakeProjectUuidNotNullable.class)
64 .add(1633, "Purge rows with null PROJECTS.PROJECT_UUID", PurgeComponentsWithoutProjectUuid.class)
65 .add(1634, "Make PROJECTS.PROJECT_UUID not nullable", MakeProjectUuidNotNullable.class)
66 .add(1635, "Add column PROJECTS.PRIVATE", AddColumnProjectsPrivate.class)
67 .add(1636, "Populate column PROJECTS.PRIVATE", PopulateColumnProjectsPrivate.class)
68 .add(1637, "Make column PROJECTS.PRIVATE not nullable", MakeColumnProjectsPrivateNotNullable.class)
69 .add(1638, "Add column ORGANIZATIONS.NEW_PROJECT_PRIVATE", AddColumnNewProjectPrivate.class)
70 .add(1639, "Set ORGANIZATIONS.NEW_PROJECT_PRIVATE to false", SetNewProjectPrivateToFalse.class)
71 .add(1640, "Make column ORGANIZATIONS.NEW_PROJECT_PRIVATE not nullable", MakeColumnNewProjectPrivateNotNullable.class)
72 .add(1641, "Make components private based on permissions", MakeComponentsPrivateBasedOnPermissions.class)
73 .add(1642, "Support private project in default permission template", SupportPrivateProjectInDefaultPermissionTemplate.class)
74 .add(1643, "Drop user and codeviewer perms to AnyOne in permission templates", SupportProjectVisibilityInTemplates.class);