aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-01-18 16:45:45 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-01-18 17:22:27 +0100
commit820af8847bfd362e2245efd3d15d8a5bee818920 (patch)
tree72615ff663f3b691d98c035bbc573ba865250f18 /sonar-core/src
parent808360559dc1349d59363fc89b468345e5a26fc9 (diff)
downloadsonarqube-820af8847bfd362e2245efd3d15d8a5bee818920.tar.gz
sonarqube-820af8847bfd362e2245efd3d15d8a5bee818920.zip
SONAR-1707 Add the column SNAPSHOTS.BUILD_DATE
Diffstat (limited to 'sonar-core/src')
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql1
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl1
-rw-r--r--sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java7
4 files changed, 7 insertions, 4 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
index 41b2cdefb81..c16464726b7 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/entity/SchemaMigration.java
@@ -34,7 +34,7 @@ public class SchemaMigration {
public final static int VERSION_UNKNOWN = -1;
- public static final int LAST_VERSION = 241;
+ public static final int LAST_VERSION = 250;
public static final int VERSION_2_13 = 241;
public final static String TABLE_NAME = "schema_migrations";
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
index a1bf630ef60..68f8597258e 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
@@ -168,6 +168,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('238');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('239');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('240');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('241');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('250');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
index 88e0b9de991..1ca492e8d03 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
@@ -125,6 +125,7 @@ CREATE TABLE "ACTIVE_RULE_PARAM_CHANGES" (
CREATE TABLE "SNAPSHOTS" (
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"CREATED_AT" TIMESTAMP,
+ "BUILD_DATE" TIMESTAMP,
"PROJECT_ID" INTEGER NOT NULL,
"PARENT_SNAPSHOT_ID" INTEGER,
"STATUS" VARCHAR(4) NOT NULL DEFAULT 'U',
diff --git a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
index 1c8e63b936a..8e4b2464c17 100644
--- a/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
+++ b/sonar-core/src/test/java/org/sonar/jpa/test/AbstractDbUnitTestCase.java
@@ -179,17 +179,18 @@ public abstract class AbstractDbUnitTestCase {
}
protected final void checkTables(String testName, String... tables) {
- checkTables(testName, new String[]{}, tables);
+ checkTablesWithExcludedColumns(testName, new String[]{}, tables);
}
- protected final void checkTables(String testName, String[] excludedColumnNames, String... tables) {
+ protected final void checkTablesWithExcludedColumns(String testName, String[] excludedColumnNames, String... tables) {
getSession().commit();
try {
IDataSet dataSet = getCurrentDataSet();
IDataSet expectedDataSet = getExpectedData(testName);
for (String table : tables) {
ITable filteredTable = DefaultColumnFilter.excludedColumnsTable(dataSet.getTable(table), excludedColumnNames);
- Assertion.assertEquals(expectedDataSet.getTable(table), filteredTable);
+ ITable filteredExpectedTable = DefaultColumnFilter.excludedColumnsTable(expectedDataSet.getTable(table), excludedColumnNames);
+ Assertion.assertEquals(filteredExpectedTable, filteredTable);
}
} catch (DataSetException e) {
throw translateException("Error while checking results", e);