aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-migration
diff options
context:
space:
mode:
authorGuillaume Jambet <guillaume.jambet@sonarsource.com>2018-04-17 11:33:15 +0200
committerSonarTech <sonartech@sonarsource.com>2018-04-26 20:20:51 +0200
commit8e56c7a85e41d4141240844117d1a046ca5021d6 (patch)
treed5cc654b466861815c843837de9590a98f151c21 /server/sonar-db-migration
parentaf22e6008c26cf2aeb1848f7dd9fdbaffcc17eb2 (diff)
downloadsonarqube-8e56c7a85e41d4141240844117d1a046ca5021d6.tar.gz
sonarqube-8e56c7a85e41d4141240844117d1a046ca5021d6.zip
SONAR-10544 remove DESCRIPTION_URL column from RULES table
Diffstat (limited to 'server/sonar-db-migration')
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternal.java6
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/DbVersion72.java2
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternalTest.java2
3 files changed, 1 insertions, 9 deletions
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternal.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternal.java
index 236f2bbefcc..20ef409ab14 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternal.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternal.java
@@ -21,7 +21,6 @@ package org.sonar.server.platform.db.migration.version.v72;
import org.sonar.db.Database;
import org.sonar.server.platform.db.migration.def.BooleanColumnDef;
-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;
@@ -41,11 +40,6 @@ public class AddRuleExternal extends DdlChange {
.setIsNullable(true)
.setDefaultValue(false)
.build())
- .addColumn(VarcharColumnDef.newVarcharColumnDefBuilder()
- .setColumnName("description_url")
- .setIsNullable(true)
- .setLimit(256)
- .build())
.build());
}
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/DbVersion72.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/DbVersion72.java
index dbbb14df39b..dd22e5fb441 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/DbVersion72.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v72/DbVersion72.java
@@ -30,6 +30,6 @@ public class DbVersion72 implements DbVersion {
.add(2100, "Increase size of USERS.CRYPTED_PASSWORD", IncreaseCryptedPasswordSize.class)
.add(2101, "Add HASH_METHOD to table users", AddHashMethodToUsersTable.class)
.add(2102, "Populate HASH_METHOD on table users", PopulateHashMethodOnUsers.class)
- .add(2103, "Add isExternal boolean and description_url to rules", AddRuleExternal.class);
+ .add(2103, "Add isExternal boolean to rules", AddRuleExternal.class);
}
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternalTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternalTest.java
index c8ce8263fc7..cf44af23344 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternalTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v72/AddRuleExternalTest.java
@@ -43,12 +43,10 @@ public class AddRuleExternalTest {
@Test
public void column_are_added_to_table() throws SQLException {
dbTester.assertColumnDoesNotExist("rules", "is_external");
- dbTester.assertColumnDoesNotExist("rules", "description_url");
underTest.execute();
dbTester.assertColumnDefinition("rules", "is_external", BOOLEAN, null, true);
- dbTester.assertColumnDefinition("rules", "description_url", VARCHAR, 256, true);
}
@Test