From: Fabrice Bellingard Date: Wed, 13 Apr 2011 09:04:32 +0000 (+0200) Subject: [SONAR-1973] Add a updated_at column X-Git-Tag: 2.8~177 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=900b65454f5eac42fb73a6e6718a38714d361a54;p=sonarqube.git [SONAR-1973] Add a updated_at column --- diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb index 4ef60d38e60..4978f21e5c5 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb @@ -1,47 +1,48 @@ -# -# Sonar, entreprise quality control tool. -# Copyright (C) 2008-2011 SonarSource -# mailto:contact AT sonarsource DOT com -# -# Sonar is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 3 of the License, or (at your option) any later version. -# -# Sonar is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with Sonar; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 -# - -# -# Sonar 2.8 -# -class CreateReview < ActiveRecord::Migration - - def self.up - create_table 'reviews' do |t| - t.column 'created_at', :datetime - t.column 'user_id', :integer, :null => true - t.column 'review_type', :string, :null => true, :limit => 10 - t.column 'status', :string, :null => true, :limit => 10 - t.column 'severity', :string, :null => true, :limit => 10 - t.column 'rule_failure_id', :integer, :null => true - t.column 'resource_id', :integer, :null => true - t.column 'resource_line', :integer, :null => true - end - - create_table 'review_comments' do |t| - t.column 'created_at', :datetime - t.column 'review_id', :integer - t.column 'user_id', :integer, :null => true - t.column 'review_text', :text, :null => true - end - - end - -end +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2011 SonarSource +# mailto:contact AT sonarsource DOT com +# +# Sonar is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Sonar is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with Sonar; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 +# + +# +# Sonar 2.8 +# +class CreateReview < ActiveRecord::Migration + + def self.up + create_table 'reviews' do |t| + t.column 'created_at', :datetime + t.column 'updated_at', :datetime + t.column 'user_id', :integer, :null => true + t.column 'review_type', :string, :null => true, :limit => 10 + t.column 'status', :string, :null => true, :limit => 10 + t.column 'severity', :string, :null => true, :limit => 10 + t.column 'rule_failure_id', :integer, :null => true + t.column 'resource_id', :integer, :null => true + t.column 'resource_line', :integer, :null => true + end + + create_table 'review_comments' do |t| + t.column 'created_at', :datetime + t.column 'review_id', :integer + t.column 'user_id', :integer, :null => true + t.column 'review_text', :text, :null => true + end + + end + +end