From b723f9f83d33a962e9b949cfa05a8fb7d9e5f657 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Thu, 27 Sep 2012 09:58:53 +0200 Subject: SONAR-3636 Add and feed a new column projects.created_at => The goal of this column is only to provide an additional piece of information when something wrong happens. --- .../src/main/java/org/sonar/core/persistence/DatabaseVersion.java | 2 +- sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql | 1 + sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sonar-core') diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index 494807f1988..8aa94e8d2a5 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -35,7 +35,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 321; + public static final int LAST_VERSION = 330; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index 1dc3d34d0e2..9b7211d2862 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -171,6 +171,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('305'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('306'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('320'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('321'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('330'); 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-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index df9d24c9993..a66ee4b5f0f 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -297,7 +297,8 @@ CREATE TABLE "PROJECTS" ( "LANGUAGE" VARCHAR(5), "COPY_RESOURCE_ID" INTEGER, "LONG_NAME" VARCHAR(256), - "PERSON_ID" INTEGER + "PERSON_ID" INTEGER, + "CREATED_AT" TIMESTAMP ); CREATE TABLE "REVIEWS" ( -- cgit v1.2.3