aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-migration
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-07-27 09:12:49 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-09-12 10:52:52 +0200
commit7515f738fb15473d144dd376fac2a1562486c049 (patch)
treecb3730c3af767dcdeb8894499d1f035b3b1ff70a /server/sonar-db-migration
parentc8a8f3eee907bf053af6dc6c9decde7de73249b3 (diff)
downloadsonarqube-7515f738fb15473d144dd376fac2a1562486c049.tar.gz
sonarqube-7515f738fb15473d144dd376fac2a1562486c049.zip
SONAR-9616 compute engine backend to support branches
Diffstat (limited to 'server/sonar-db-migration')
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/AddBranchColumnToProjectsTable.java1
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranches.java4
-rw-r--r--server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranchesTest.java1
3 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/AddBranchColumnToProjectsTable.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/AddBranchColumnToProjectsTable.java
index 713f7dab8ff..cb499371b99 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/AddBranchColumnToProjectsTable.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/AddBranchColumnToProjectsTable.java
@@ -17,7 +17,6 @@
* 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.v66;
import java.sql.SQLException;
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranches.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranches.java
index f7884a01dcf..db40d988aec 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranches.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranches.java
@@ -76,6 +76,10 @@ public class CreateTableProjectBranches extends DdlChange {
.setColumnName("created_at")
.setIsNullable(false)
.build())
+ .addColumn(BigIntegerColumnDef.newBigIntegerColumnDefBuilder()
+ .setColumnName("updated_at")
+ .setIsNullable(false)
+ .build())
.build()
);
}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranchesTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranchesTest.java
index a960ef02b65..f8d74a0b115 100644
--- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranchesTest.java
+++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v66/CreateTableProjectBranchesTest.java
@@ -53,6 +53,7 @@ public class CreateTableProjectBranchesTest {
db.assertColumnDefinition(TABLE, "merge_branch_uuid", Types.VARCHAR, 50, true);
db.assertColumnDefinition(TABLE, "pull_request_title", Types.VARCHAR, 4000, true);
db.assertColumnDefinition(TABLE, "created_at", Types.BIGINT, null, false);
+ db.assertColumnDefinition(TABLE, "updated_at", Types.BIGINT, null, false);
db.assertPrimaryKey(TABLE, "pk_" + TABLE, "uuid");
}