]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5329 - Field renaming in DB
authorStephane Gamard <stephane.gamard@searchbox.com>
Wed, 4 Jun 2014 14:53:43 +0000 (16:53 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Wed, 4 Jun 2014 14:57:30 +0000 (16:57 +0200)
sonar-core/src/main/resources/org/sonar/core/log/db/LogMapper.xml
sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
sonar-server/src/main/webapp/WEB-INF/db/migrate/540_create_log_table.rb

index 61f964cbfcdc533669ab9f6412334f5c079f8de1..ddc966578a8c7ccbd5e49f667c7e072fde45e4be 100644 (file)
@@ -11,9 +11,9 @@
     <select id="selectByKey" parameterType="map" resultType="Log">
       SELECT
         l.payload_field as "payload",
-        l.time_field as "time",
+        l.created_at as "time",
         l.execution_time_field as "executionTime",
-        l.author_field as "author",
+        l.user_login as "author",
         l.data_field as "data"
       FROM logs l
       WHERE l.time_field=#{key.time}
index 653080d15b519a5e4854de37f7537b3c04112255..bf7ced267bd6433be4dc9f8cbb30243fa5f0f094 100644 (file)
@@ -557,9 +557,9 @@ CREATE TABLE "PERM_TEMPLATES_GROUPS" (
 
 
 CREATE TABLE "LOGS" (
-  "TIME_FIELD" TIMESTAMP,
+  "CREATED_AT" TIMESTAMP,
   "EXECUTION_TIME_FIELD" LONG,
-  "AUTHOR_FIELD" VARCHAR(30),
+  "USER_LOGIN" VARCHAR(30),
   "PAYLOAD_FIELD" VARCHAR(250),
   "DATA_FIELD" CLOB(2147483647)
 );
index d81366d597311192d327d56b7a9107e2dce978a8..eff627f51e362f686f12abf101762625bdf8dbe4 100644 (file)
@@ -21,10 +21,10 @@ class CreateLogTable < ActiveRecord::Migration
 
   def self.up
     create_table 'logs'do |t|
-      t.column 'time_field',   :datetime, :null => false
-      t.column 'execution_time_field', :long
-      t.column 'author_field', :string
-      t.column 'data_field', :blob
+      t.column 'created_at',   :datetime, :null => false
+      t.column 'execution_time_field', :int
+      t.column 'user_login', :string
+      t.column 'data_field', :text
       t.column 'payload_field', :string
     end