import org.sonar.server.platform.db.migration.version.v94.DbVersion94;
import org.sonar.server.platform.db.migration.version.v95.DbVersion95;
import org.sonar.server.platform.db.migration.version.v96.DbVersion96;
+import org.sonar.server.platform.db.migration.version.v97.DbVersion97;
public class MigrationConfigurationModule extends Module {
@Override
DbVersion94.class,
DbVersion95.class,
DbVersion96.class,
+ DbVersion97.class,
// migration steps
MigrationStepRegistryImpl.class,
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.platform.db.migration.version.v96;
-
-import com.google.common.annotations.VisibleForTesting;
-import java.sql.Connection;
-import java.sql.SQLException;
-import org.sonar.db.Database;
-import org.sonar.db.DatabaseUtils;
-import org.sonar.server.platform.db.migration.def.VarcharColumnDef;
-import org.sonar.server.platform.db.migration.sql.AddColumnsBuilder;
-import org.sonar.server.platform.db.migration.step.DdlChange;
-
-import static org.sonar.server.platform.db.migration.def.VarcharColumnDef.newVarcharColumnDefBuilder;
-import static org.sonar.server.platform.db.migration.version.v96.DbConstants.WEBHOOK_SECRET_COLUMN_SIZE;
-
-public class AddWebhookSecretToAlmSettingsTable extends DdlChange {
-
- @VisibleForTesting
- static final String WEBHOOK_SECRET_COLUMN_NAME = "webhook_secret";
- @VisibleForTesting
- static final String ALM_SETTINGS_TABLE_NAME = "alm_settings";
-
- private static final VarcharColumnDef COLUMN_DEFINITION = newVarcharColumnDefBuilder()
- .setColumnName(WEBHOOK_SECRET_COLUMN_NAME)
- .setIsNullable(true)
- .setLimit(WEBHOOK_SECRET_COLUMN_SIZE).build();
-
-
- public AddWebhookSecretToAlmSettingsTable(Database db) {
- super(db);
- }
-
- @Override
- public void execute(Context context) throws SQLException {
- try (Connection connection = getDatabase().getDataSource().getConnection()) {
- createWebhookSecretColumn(context, connection);
- }
- }
-
- private void createWebhookSecretColumn(Context context, Connection connection) {
- if (!DatabaseUtils.tableColumnExists(connection, ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME)) {
- context.execute(new AddColumnsBuilder(getDialect(), ALM_SETTINGS_TABLE_NAME)
- .addColumn(COLUMN_DEFINITION)
- .build());
- }
- }
-
-}
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.platform.db.migration.version.v96;
-
-import com.google.common.annotations.VisibleForTesting;
-import java.sql.Connection;
-import java.sql.SQLException;
-import org.sonar.db.Database;
-import org.sonar.db.DatabaseUtils;
-import org.sonar.server.platform.db.migration.sql.CreateIndexBuilder;
-import org.sonar.server.platform.db.migration.step.DdlChange;
-
-public class CreateUniqueIndexForComponentsUuid extends DdlChange {
-
- @VisibleForTesting
- static final String COLUMN_NAME = "uuid";
- @VisibleForTesting
- static final String TABLE = "components";
- @VisibleForTesting
- static final String INDEX_NAME = "components_uuid";
-
- public CreateUniqueIndexForComponentsUuid(Database db) {
- super(db);
- }
-
- @Override
- public void execute(Context context) throws SQLException {
- try (Connection connection = getDatabase().getDataSource().getConnection()) {
- createComponentsUuidUniqueIndex(context, connection);
- }
- }
-
- private static void createComponentsUuidUniqueIndex(Context context, Connection connection) {
- if (!DatabaseUtils.indexExistsIgnoreCase(TABLE, INDEX_NAME, connection)) {
- context.execute(new CreateIndexBuilder()
- .setTable(TABLE)
- .setName(INDEX_NAME)
- .addColumn(COLUMN_NAME)
- .setUnique(true)
- .build());
- }
- }
-}
.add(6512, "Add column 'language' to 'push_events'", AddLanguageColumnToPushEventsTable.class)
.add(6513, "Delete duplicated rows in 'project_badge_token'", DeleteDuplicatedProjectBadgeTokens.class)
.add(6514, "Add unique index on 'project_uuid' in 'project_badge_token'", CreateIndexForProjectBadgeTokens.class)
- .add(6515, "Add column 'webhook_secret' to 'alm_settings'", AddWebhookSecretToAlmSettingsTable.class)
- .add(6516, "Drop non unique index on 'uuid' in 'components'", DropNonUniqueIndexForComponentsUuid.class)
- .add(6517, "Add unique index on 'uuid' in 'components'", CreateUniqueIndexForComponentsUuid.class)
;
}
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.platform.db.migration.version.v96;
-
-import com.google.common.annotations.VisibleForTesting;
-import org.sonar.db.Database;
-import org.sonar.server.platform.db.migration.step.DropIndexChange;
-
-public class DropNonUniqueIndexForComponentsUuid extends DropIndexChange {
-
- @VisibleForTesting
- static final String TABLE = "components";
- @VisibleForTesting
- static final String INDEX_NAME = "projects_uuid";
-
- public DropNonUniqueIndexForComponentsUuid(Database db) {
- super(db, INDEX_NAME, TABLE);
- }
-
-}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.sql.Connection;
+import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.db.DatabaseUtils;
+import org.sonar.server.platform.db.migration.def.VarcharColumnDef;
+import org.sonar.server.platform.db.migration.sql.AddColumnsBuilder;
+import org.sonar.server.platform.db.migration.step.DdlChange;
+
+import static org.sonar.server.platform.db.migration.def.VarcharColumnDef.newVarcharColumnDefBuilder;
+import static org.sonar.server.platform.db.migration.version.v97.DbConstants.WEBHOOK_SECRET_COLUMN_SIZE;
+
+public class AddWebhookSecretToAlmSettingsTable extends DdlChange {
+
+ @VisibleForTesting
+ static final String WEBHOOK_SECRET_COLUMN_NAME = "webhook_secret";
+ @VisibleForTesting
+ static final String ALM_SETTINGS_TABLE_NAME = "alm_settings";
+
+ private static final VarcharColumnDef COLUMN_DEFINITION = newVarcharColumnDefBuilder()
+ .setColumnName(WEBHOOK_SECRET_COLUMN_NAME)
+ .setIsNullable(true)
+ .setLimit(WEBHOOK_SECRET_COLUMN_SIZE).build();
+
+
+ public AddWebhookSecretToAlmSettingsTable(Database db) {
+ super(db);
+ }
+
+ @Override
+ public void execute(Context context) throws SQLException {
+ try (Connection connection = getDatabase().getDataSource().getConnection()) {
+ createWebhookSecretColumn(context, connection);
+ }
+ }
+
+ private void createWebhookSecretColumn(Context context, Connection connection) {
+ if (!DatabaseUtils.tableColumnExists(connection, ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME)) {
+ context.execute(new AddColumnsBuilder(getDialect(), ALM_SETTINGS_TABLE_NAME)
+ .addColumn(COLUMN_DEFINITION)
+ .build());
+ }
+ }
+
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.sql.Connection;
+import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.db.DatabaseUtils;
+import org.sonar.server.platform.db.migration.sql.CreateIndexBuilder;
+import org.sonar.server.platform.db.migration.step.DdlChange;
+
+public class CreateUniqueIndexForComponentsUuid extends DdlChange {
+
+ @VisibleForTesting
+ static final String COLUMN_NAME = "uuid";
+ @VisibleForTesting
+ static final String TABLE = "components";
+ @VisibleForTesting
+ static final String INDEX_NAME = "components_uuid";
+
+ public CreateUniqueIndexForComponentsUuid(Database db) {
+ super(db);
+ }
+
+ @Override
+ public void execute(Context context) throws SQLException {
+ try (Connection connection = getDatabase().getDataSource().getConnection()) {
+ createComponentsUuidUniqueIndex(context, connection);
+ }
+ }
+
+ private static void createComponentsUuidUniqueIndex(Context context, Connection connection) {
+ if (!DatabaseUtils.indexExistsIgnoreCase(TABLE, INDEX_NAME, connection)) {
+ context.execute(new CreateIndexBuilder()
+ .setTable(TABLE)
+ .setName(INDEX_NAME)
+ .addColumn(COLUMN_NAME)
+ .setUnique(true)
+ .build());
+ }
+ }
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+class DbConstants {
+ static final int CONTEXT_KEY_COLUMNS_SIZE = 50;
+ static final int WEBHOOK_SECRET_COLUMN_SIZE = 160;
+
+ private DbConstants() {
+ throw new IllegalStateException("This class must not be instantiated");
+ }
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import org.sonar.server.platform.db.migration.step.MigrationStepRegistry;
+import org.sonar.server.platform.db.migration.version.DbVersion;
+
+public class DbVersion97 implements DbVersion {
+ @Override
+ public void addSteps(MigrationStepRegistry registry) {
+ registry
+ .add(6600, "Add column 'webhook_secret' to 'alm_settings'", AddWebhookSecretToAlmSettingsTable.class)
+ .add(6601, "Drop non unique index on 'uuid' in 'components'", DropNonUniqueIndexForComponentsUuid.class)
+ .add(6602, "Add unique index on 'uuid' in 'components'", CreateUniqueIndexForComponentsUuid.class)
+ ;
+ }
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import com.google.common.annotations.VisibleForTesting;
+import org.sonar.db.Database;
+import org.sonar.server.platform.db.migration.step.DropIndexChange;
+
+public class DropNonUniqueIndexForComponentsUuid extends DropIndexChange {
+
+ @VisibleForTesting
+ static final String TABLE = "components";
+ @VisibleForTesting
+ static final String INDEX_NAME = "projects_uuid";
+
+ public DropNonUniqueIndexForComponentsUuid(Database db) {
+ super(db, INDEX_NAME, TABLE);
+ }
+
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.platform.db.migration.version.v96;
-
-import java.sql.SQLException;
-import java.sql.Types;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.db.CoreDbTester;
-
-import static org.sonar.db.CoreDbTester.createForSchema;
-import static org.sonar.server.platform.db.migration.version.v96.AddWebhookSecretToAlmSettingsTable.ALM_SETTINGS_TABLE_NAME;
-import static org.sonar.server.platform.db.migration.version.v96.AddWebhookSecretToAlmSettingsTable.WEBHOOK_SECRET_COLUMN_NAME;
-import static org.sonar.server.platform.db.migration.version.v96.DbConstants.WEBHOOK_SECRET_COLUMN_SIZE;
-
-public class AddWebhookSecretToAlmSettingsTableTest {
-
- @Rule
- public final CoreDbTester db = createForSchema(AddWebhookSecretToAlmSettingsTableTest.class, "schema.sql");
-
- private final AddWebhookSecretToAlmSettingsTable underTest = new AddWebhookSecretToAlmSettingsTable(db.database());
-
- @Test
- public void column_language_should_be_added() throws SQLException {
- db.assertColumnDoesNotExist(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME);
-
- underTest.execute();
-
- db.assertColumnDefinition(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME, Types.VARCHAR, WEBHOOK_SECRET_COLUMN_SIZE, true);
- }
-
- @Test
- public void migration_should_be_reentrant() throws SQLException {
- db.assertColumnDoesNotExist(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME);
-
- underTest.execute();
- underTest.execute();
-
- db.assertColumnDefinition(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME, Types.VARCHAR, WEBHOOK_SECRET_COLUMN_SIZE, true);
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.platform.db.migration.version.v96;
-
-import java.sql.SQLException;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.db.CoreDbTester;
-
-import static org.sonar.server.platform.db.migration.version.v96.CreateUniqueIndexForComponentsUuid.COLUMN_NAME;
-import static org.sonar.server.platform.db.migration.version.v96.CreateUniqueIndexForComponentsUuid.INDEX_NAME;
-import static org.sonar.server.platform.db.migration.version.v96.CreateUniqueIndexForComponentsUuid.TABLE;
-
-public class CreateUniqueIndexForComponentsUuidTest {
-
- @Rule
- public final CoreDbTester db = CoreDbTester.createForSchema(CreateUniqueIndexForComponentsUuidTest.class, "schema.sql");
-
- private final CreateUniqueIndexForComponentsUuid createUniqueIndexForComponentsUuid = new CreateUniqueIndexForComponentsUuid(db.database());
-
- @Test
- public void migration_should_create_index() throws SQLException {
- db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
-
- createUniqueIndexForComponentsUuid.execute();
-
- db.assertUniqueIndex(TABLE, INDEX_NAME, COLUMN_NAME);
- }
-
- @Test
- public void migration_should_be_reentrant() throws SQLException {
- db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
-
- createUniqueIndexForComponentsUuid.execute();
- createUniqueIndexForComponentsUuid.execute();
-
- db.assertUniqueIndex(TABLE, INDEX_NAME, COLUMN_NAME);
- }
-
-
-}
\ No newline at end of file
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program 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.
- *
- * This program 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.platform.db.migration.version.v96;
-
-import java.sql.SQLException;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.db.CoreDbTester;
-
-import static org.sonar.server.platform.db.migration.version.v96.DropNonUniqueIndexForComponentsUuid.INDEX_NAME;
-import static org.sonar.server.platform.db.migration.version.v96.DropNonUniqueIndexForComponentsUuid.TABLE;
-
-public class DropNonUniqueIndexForComponentsUuidTest {
-
- private static final String COLUMN_NAME = "uuid";
- @Rule
- public final CoreDbTester db = CoreDbTester.createForSchema(DropNonUniqueIndexForComponentsUuidTest.class, "schema.sql");
-
- private final DropNonUniqueIndexForComponentsUuid dropNonUniqueIndexForComponentsUuid = new DropNonUniqueIndexForComponentsUuid(db.database());
-
- @Test
- public void migration_should_drop_unique_index() throws SQLException {
- db.assertIndex(TABLE, INDEX_NAME, COLUMN_NAME);
-
- dropNonUniqueIndexForComponentsUuid.execute();
-
- db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
- }
-
-
- @Test
- public void migration_should_be_reentrant() throws SQLException {
- db.assertIndex(TABLE, INDEX_NAME, COLUMN_NAME);
-
- dropNonUniqueIndexForComponentsUuid.execute();
- dropNonUniqueIndexForComponentsUuid.execute();
-
- db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
- }
-
-}
\ No newline at end of file
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import java.sql.SQLException;
+import java.sql.Types;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonar.db.CoreDbTester;
+
+import static org.sonar.db.CoreDbTester.createForSchema;
+import static org.sonar.server.platform.db.migration.version.v97.AddWebhookSecretToAlmSettingsTable.ALM_SETTINGS_TABLE_NAME;
+import static org.sonar.server.platform.db.migration.version.v97.AddWebhookSecretToAlmSettingsTable.WEBHOOK_SECRET_COLUMN_NAME;
+import static org.sonar.server.platform.db.migration.version.v97.DbConstants.WEBHOOK_SECRET_COLUMN_SIZE;
+
+public class AddWebhookSecretToAlmSettingsTableTest {
+
+ @Rule
+ public final CoreDbTester db = createForSchema(AddWebhookSecretToAlmSettingsTableTest.class, "schema.sql");
+
+ private final AddWebhookSecretToAlmSettingsTable underTest = new AddWebhookSecretToAlmSettingsTable(db.database());
+
+ @Test
+ public void column_language_should_be_added() throws SQLException {
+ db.assertColumnDoesNotExist(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME);
+
+ underTest.execute();
+
+ db.assertColumnDefinition(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME, Types.VARCHAR, WEBHOOK_SECRET_COLUMN_SIZE, true);
+ }
+
+ @Test
+ public void migration_should_be_reentrant() throws SQLException {
+ db.assertColumnDoesNotExist(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME);
+
+ underTest.execute();
+ underTest.execute();
+
+ db.assertColumnDefinition(ALM_SETTINGS_TABLE_NAME, WEBHOOK_SECRET_COLUMN_NAME, Types.VARCHAR, WEBHOOK_SECRET_COLUMN_SIZE, true);
+ }
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import java.sql.SQLException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonar.db.CoreDbTester;
+
+import static org.sonar.server.platform.db.migration.version.v97.CreateUniqueIndexForComponentsUuid.COLUMN_NAME;
+import static org.sonar.server.platform.db.migration.version.v97.CreateUniqueIndexForComponentsUuid.INDEX_NAME;
+import static org.sonar.server.platform.db.migration.version.v97.CreateUniqueIndexForComponentsUuid.TABLE;
+
+public class CreateUniqueIndexForComponentsUuidTest {
+
+ @Rule
+ public final CoreDbTester db = CoreDbTester.createForSchema(CreateUniqueIndexForComponentsUuidTest.class, "schema.sql");
+
+ private final CreateUniqueIndexForComponentsUuid createUniqueIndexForComponentsUuid = new CreateUniqueIndexForComponentsUuid(db.database());
+
+ @Test
+ public void migration_should_create_index() throws SQLException {
+ db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
+
+ createUniqueIndexForComponentsUuid.execute();
+
+ db.assertUniqueIndex(TABLE, INDEX_NAME, COLUMN_NAME);
+ }
+
+ @Test
+ public void migration_should_be_reentrant() throws SQLException {
+ db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
+
+ createUniqueIndexForComponentsUuid.execute();
+ createUniqueIndexForComponentsUuid.execute();
+
+ db.assertUniqueIndex(TABLE, INDEX_NAME, COLUMN_NAME);
+ }
+
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import org.junit.Test;
+
+import static org.sonar.server.platform.db.migration.version.DbVersionTestUtils.verifyMigrationNotEmpty;
+import static org.sonar.server.platform.db.migration.version.DbVersionTestUtils.verifyMinimumMigrationNumber;
+
+public class DbVersion97Test {
+
+ private final DbVersion97 underTest = new DbVersion97();
+
+ @Test
+ public void migrationNumber_starts_at_6600() {
+ verifyMinimumMigrationNumber(underTest, 6600);
+ }
+
+ @Test
+ public void verify_migration_is_not_empty() {
+ verifyMigrationNotEmpty(underTest);
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.platform.db.migration.version.v97;
+
+import java.sql.SQLException;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonar.db.CoreDbTester;
+
+import static org.sonar.server.platform.db.migration.version.v97.DropNonUniqueIndexForComponentsUuid.INDEX_NAME;
+import static org.sonar.server.platform.db.migration.version.v97.DropNonUniqueIndexForComponentsUuid.TABLE;
+
+public class DropNonUniqueIndexForComponentsUuidTest {
+
+ private static final String COLUMN_NAME = "uuid";
+ @Rule
+ public final CoreDbTester db = CoreDbTester.createForSchema(DropNonUniqueIndexForComponentsUuidTest.class, "schema.sql");
+
+ private final DropNonUniqueIndexForComponentsUuid dropNonUniqueIndexForComponentsUuid = new DropNonUniqueIndexForComponentsUuid(db.database());
+
+ @Test
+ public void migration_should_drop_unique_index() throws SQLException {
+ db.assertIndex(TABLE, INDEX_NAME, COLUMN_NAME);
+
+ dropNonUniqueIndexForComponentsUuid.execute();
+
+ db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
+ }
+
+
+ @Test
+ public void migration_should_be_reentrant() throws SQLException {
+ db.assertIndex(TABLE, INDEX_NAME, COLUMN_NAME);
+
+ dropNonUniqueIndexForComponentsUuid.execute();
+ dropNonUniqueIndexForComponentsUuid.execute();
+
+ db.assertIndexDoesNotExist(TABLE, INDEX_NAME);
+ }
+
+}
\ No newline at end of file
+++ /dev/null
- CREATE TABLE "ALM_SETTINGS"(
- "UUID" VARCHAR(40) NOT NULL,
- "ALM_ID" VARCHAR(40) NOT NULL,
- "KEE" VARCHAR(200) NOT NULL,
- "URL" VARCHAR(2000),
- "APP_ID" VARCHAR(80),
- "PRIVATE_KEY" VARCHAR(2000),
- "PAT" VARCHAR(2000),
- "UPDATED_AT" BIGINT NOT NULL,
- "CREATED_AT" BIGINT NOT NULL,
- "CLIENT_ID" VARCHAR(80),
- "CLIENT_SECRET" VARCHAR(80)
- );
- ALTER TABLE "ALM_SETTINGS" ADD CONSTRAINT "PK_ALM_SETTINGS" PRIMARY KEY("UUID");
- CREATE UNIQUE INDEX "UNIQ_ALM_SETTINGS" ON "ALM_SETTINGS"("KEE");
\ No newline at end of file
+++ /dev/null
-CREATE TABLE "COMPONENTS"(
- "UUID" CHARACTER VARYING(50) NOT NULL,
- "KEE" CHARACTER VARYING(1000),
- "DEPRECATED_KEE" CHARACTER VARYING(400),
- "NAME" CHARACTER VARYING(2000),
- "LONG_NAME" CHARACTER VARYING(2000),
- "DESCRIPTION" CHARACTER VARYING(2000),
- "ENABLED" BOOLEAN DEFAULT TRUE NOT NULL,
- "SCOPE" CHARACTER VARYING(3),
- "QUALIFIER" CHARACTER VARYING(10),
- "PRIVATE" BOOLEAN NOT NULL,
- "ROOT_UUID" CHARACTER VARYING(50) NOT NULL,
- "LANGUAGE" CHARACTER VARYING(20),
- "COPY_COMPONENT_UUID" CHARACTER VARYING(50),
- "PATH" CHARACTER VARYING(2000),
- "UUID_PATH" CHARACTER VARYING(1500) NOT NULL,
- "PROJECT_UUID" CHARACTER VARYING(50) NOT NULL,
- "MODULE_UUID" CHARACTER VARYING(50),
- "MODULE_UUID_PATH" CHARACTER VARYING(1500),
- "MAIN_BRANCH_PROJECT_UUID" CHARACTER VARYING(50),
- "B_CHANGED" BOOLEAN,
- "B_NAME" CHARACTER VARYING(500),
- "B_LONG_NAME" CHARACTER VARYING(500),
- "B_DESCRIPTION" CHARACTER VARYING(2000),
- "B_ENABLED" BOOLEAN,
- "B_QUALIFIER" CHARACTER VARYING(10),
- "B_LANGUAGE" CHARACTER VARYING(20),
- "B_COPY_COMPONENT_UUID" CHARACTER VARYING(50),
- "B_PATH" CHARACTER VARYING(2000),
- "B_UUID_PATH" CHARACTER VARYING(1500),
- "B_MODULE_UUID" CHARACTER VARYING(50),
- "B_MODULE_UUID_PATH" CHARACTER VARYING(1500),
- "CREATED_AT" TIMESTAMP
-);
-CREATE UNIQUE INDEX "PROJECTS_KEE" ON "COMPONENTS"("KEE" NULLS FIRST);
-CREATE INDEX "PROJECTS_MODULE_UUID" ON "COMPONENTS"("MODULE_UUID" NULLS FIRST);
-CREATE INDEX "PROJECTS_PROJECT_UUID" ON "COMPONENTS"("PROJECT_UUID" NULLS FIRST);
-CREATE INDEX "PROJECTS_QUALIFIER" ON "COMPONENTS"("QUALIFIER" NULLS FIRST);
-CREATE INDEX "PROJECTS_ROOT_UUID" ON "COMPONENTS"("ROOT_UUID" NULLS FIRST);
-CREATE INDEX "IDX_MAIN_BRANCH_PRJ_UUID" ON "COMPONENTS"("MAIN_BRANCH_PROJECT_UUID" NULLS FIRST);
\ No newline at end of file
+++ /dev/null
-CREATE TABLE "COMPONENTS"(
- "UUID" CHARACTER VARYING(50) NOT NULL,
- "KEE" CHARACTER VARYING(1000),
- "DEPRECATED_KEE" CHARACTER VARYING(400),
- "NAME" CHARACTER VARYING(2000),
- "LONG_NAME" CHARACTER VARYING(2000),
- "DESCRIPTION" CHARACTER VARYING(2000),
- "ENABLED" BOOLEAN DEFAULT TRUE NOT NULL,
- "SCOPE" CHARACTER VARYING(3),
- "QUALIFIER" CHARACTER VARYING(10),
- "PRIVATE" BOOLEAN NOT NULL,
- "ROOT_UUID" CHARACTER VARYING(50) NOT NULL,
- "LANGUAGE" CHARACTER VARYING(20),
- "COPY_COMPONENT_UUID" CHARACTER VARYING(50),
- "PATH" CHARACTER VARYING(2000),
- "UUID_PATH" CHARACTER VARYING(1500) NOT NULL,
- "PROJECT_UUID" CHARACTER VARYING(50) NOT NULL,
- "MODULE_UUID" CHARACTER VARYING(50),
- "MODULE_UUID_PATH" CHARACTER VARYING(1500),
- "MAIN_BRANCH_PROJECT_UUID" CHARACTER VARYING(50),
- "B_CHANGED" BOOLEAN,
- "B_NAME" CHARACTER VARYING(500),
- "B_LONG_NAME" CHARACTER VARYING(500),
- "B_DESCRIPTION" CHARACTER VARYING(2000),
- "B_ENABLED" BOOLEAN,
- "B_QUALIFIER" CHARACTER VARYING(10),
- "B_LANGUAGE" CHARACTER VARYING(20),
- "B_COPY_COMPONENT_UUID" CHARACTER VARYING(50),
- "B_PATH" CHARACTER VARYING(2000),
- "B_UUID_PATH" CHARACTER VARYING(1500),
- "B_MODULE_UUID" CHARACTER VARYING(50),
- "B_MODULE_UUID_PATH" CHARACTER VARYING(1500),
- "CREATED_AT" TIMESTAMP
-);
-CREATE UNIQUE INDEX "PROJECTS_KEE" ON "COMPONENTS"("KEE" NULLS FIRST);
-CREATE INDEX "PROJECTS_MODULE_UUID" ON "COMPONENTS"("MODULE_UUID" NULLS FIRST);
-CREATE INDEX "PROJECTS_PROJECT_UUID" ON "COMPONENTS"("PROJECT_UUID" NULLS FIRST);
-CREATE INDEX "PROJECTS_QUALIFIER" ON "COMPONENTS"("QUALIFIER" NULLS FIRST);
-CREATE INDEX "PROJECTS_ROOT_UUID" ON "COMPONENTS"("ROOT_UUID" NULLS FIRST);
-CREATE INDEX "PROJECTS_UUID" ON "COMPONENTS"("UUID" NULLS FIRST);
-CREATE INDEX "IDX_MAIN_BRANCH_PRJ_UUID" ON "COMPONENTS"("MAIN_BRANCH_PROJECT_UUID" NULLS FIRST);
\ No newline at end of file
--- /dev/null
+ CREATE TABLE "ALM_SETTINGS"(
+ "UUID" VARCHAR(40) NOT NULL,
+ "ALM_ID" VARCHAR(40) NOT NULL,
+ "KEE" VARCHAR(200) NOT NULL,
+ "URL" VARCHAR(2000),
+ "APP_ID" VARCHAR(80),
+ "PRIVATE_KEY" VARCHAR(2000),
+ "PAT" VARCHAR(2000),
+ "UPDATED_AT" BIGINT NOT NULL,
+ "CREATED_AT" BIGINT NOT NULL,
+ "CLIENT_ID" VARCHAR(80),
+ "CLIENT_SECRET" VARCHAR(80)
+ );
+ ALTER TABLE "ALM_SETTINGS" ADD CONSTRAINT "PK_ALM_SETTINGS" PRIMARY KEY("UUID");
+ CREATE UNIQUE INDEX "UNIQ_ALM_SETTINGS" ON "ALM_SETTINGS"("KEE");
\ No newline at end of file
--- /dev/null
+CREATE TABLE "COMPONENTS"(
+ "UUID" CHARACTER VARYING(50) NOT NULL,
+ "KEE" CHARACTER VARYING(1000),
+ "DEPRECATED_KEE" CHARACTER VARYING(400),
+ "NAME" CHARACTER VARYING(2000),
+ "LONG_NAME" CHARACTER VARYING(2000),
+ "DESCRIPTION" CHARACTER VARYING(2000),
+ "ENABLED" BOOLEAN DEFAULT TRUE NOT NULL,
+ "SCOPE" CHARACTER VARYING(3),
+ "QUALIFIER" CHARACTER VARYING(10),
+ "PRIVATE" BOOLEAN NOT NULL,
+ "ROOT_UUID" CHARACTER VARYING(50) NOT NULL,
+ "LANGUAGE" CHARACTER VARYING(20),
+ "COPY_COMPONENT_UUID" CHARACTER VARYING(50),
+ "PATH" CHARACTER VARYING(2000),
+ "UUID_PATH" CHARACTER VARYING(1500) NOT NULL,
+ "PROJECT_UUID" CHARACTER VARYING(50) NOT NULL,
+ "MODULE_UUID" CHARACTER VARYING(50),
+ "MODULE_UUID_PATH" CHARACTER VARYING(1500),
+ "MAIN_BRANCH_PROJECT_UUID" CHARACTER VARYING(50),
+ "B_CHANGED" BOOLEAN,
+ "B_NAME" CHARACTER VARYING(500),
+ "B_LONG_NAME" CHARACTER VARYING(500),
+ "B_DESCRIPTION" CHARACTER VARYING(2000),
+ "B_ENABLED" BOOLEAN,
+ "B_QUALIFIER" CHARACTER VARYING(10),
+ "B_LANGUAGE" CHARACTER VARYING(20),
+ "B_COPY_COMPONENT_UUID" CHARACTER VARYING(50),
+ "B_PATH" CHARACTER VARYING(2000),
+ "B_UUID_PATH" CHARACTER VARYING(1500),
+ "B_MODULE_UUID" CHARACTER VARYING(50),
+ "B_MODULE_UUID_PATH" CHARACTER VARYING(1500),
+ "CREATED_AT" TIMESTAMP
+);
+CREATE UNIQUE INDEX "PROJECTS_KEE" ON "COMPONENTS"("KEE" NULLS FIRST);
+CREATE INDEX "PROJECTS_MODULE_UUID" ON "COMPONENTS"("MODULE_UUID" NULLS FIRST);
+CREATE INDEX "PROJECTS_PROJECT_UUID" ON "COMPONENTS"("PROJECT_UUID" NULLS FIRST);
+CREATE INDEX "PROJECTS_QUALIFIER" ON "COMPONENTS"("QUALIFIER" NULLS FIRST);
+CREATE INDEX "PROJECTS_ROOT_UUID" ON "COMPONENTS"("ROOT_UUID" NULLS FIRST);
+CREATE INDEX "IDX_MAIN_BRANCH_PRJ_UUID" ON "COMPONENTS"("MAIN_BRANCH_PROJECT_UUID" NULLS FIRST);
\ No newline at end of file
--- /dev/null
+CREATE TABLE "COMPONENTS"(
+ "UUID" CHARACTER VARYING(50) NOT NULL,
+ "KEE" CHARACTER VARYING(1000),
+ "DEPRECATED_KEE" CHARACTER VARYING(400),
+ "NAME" CHARACTER VARYING(2000),
+ "LONG_NAME" CHARACTER VARYING(2000),
+ "DESCRIPTION" CHARACTER VARYING(2000),
+ "ENABLED" BOOLEAN DEFAULT TRUE NOT NULL,
+ "SCOPE" CHARACTER VARYING(3),
+ "QUALIFIER" CHARACTER VARYING(10),
+ "PRIVATE" BOOLEAN NOT NULL,
+ "ROOT_UUID" CHARACTER VARYING(50) NOT NULL,
+ "LANGUAGE" CHARACTER VARYING(20),
+ "COPY_COMPONENT_UUID" CHARACTER VARYING(50),
+ "PATH" CHARACTER VARYING(2000),
+ "UUID_PATH" CHARACTER VARYING(1500) NOT NULL,
+ "PROJECT_UUID" CHARACTER VARYING(50) NOT NULL,
+ "MODULE_UUID" CHARACTER VARYING(50),
+ "MODULE_UUID_PATH" CHARACTER VARYING(1500),
+ "MAIN_BRANCH_PROJECT_UUID" CHARACTER VARYING(50),
+ "B_CHANGED" BOOLEAN,
+ "B_NAME" CHARACTER VARYING(500),
+ "B_LONG_NAME" CHARACTER VARYING(500),
+ "B_DESCRIPTION" CHARACTER VARYING(2000),
+ "B_ENABLED" BOOLEAN,
+ "B_QUALIFIER" CHARACTER VARYING(10),
+ "B_LANGUAGE" CHARACTER VARYING(20),
+ "B_COPY_COMPONENT_UUID" CHARACTER VARYING(50),
+ "B_PATH" CHARACTER VARYING(2000),
+ "B_UUID_PATH" CHARACTER VARYING(1500),
+ "B_MODULE_UUID" CHARACTER VARYING(50),
+ "B_MODULE_UUID_PATH" CHARACTER VARYING(1500),
+ "CREATED_AT" TIMESTAMP
+);
+CREATE UNIQUE INDEX "PROJECTS_KEE" ON "COMPONENTS"("KEE" NULLS FIRST);
+CREATE INDEX "PROJECTS_MODULE_UUID" ON "COMPONENTS"("MODULE_UUID" NULLS FIRST);
+CREATE INDEX "PROJECTS_PROJECT_UUID" ON "COMPONENTS"("PROJECT_UUID" NULLS FIRST);
+CREATE INDEX "PROJECTS_QUALIFIER" ON "COMPONENTS"("QUALIFIER" NULLS FIRST);
+CREATE INDEX "PROJECTS_ROOT_UUID" ON "COMPONENTS"("ROOT_UUID" NULLS FIRST);
+CREATE INDEX "PROJECTS_UUID" ON "COMPONENTS"("UUID" NULLS FIRST);
+CREATE INDEX "IDX_MAIN_BRANCH_PRJ_UUID" ON "COMPONENTS"("MAIN_BRANCH_PROJECT_UUID" NULLS FIRST);
\ No newline at end of file