diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-08-22 23:42:57 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-08-23 21:38:51 +0200 |
commit | 01056ae8db1ba68f563ee36b385f8eaf24fa0562 (patch) | |
tree | c137733a9e9ae8c139fcb05ce0df962f2fa15776 | |
parent | d6a050cc1c460c26c887b8b398bdee5691736720 (diff) | |
download | sonarqube-01056ae8db1ba68f563ee36b385f8eaf24fa0562.tar.gz sonarqube-01056ae8db1ba68f563ee36b385f8eaf24fa0562.zip |
SONAR-7903 merge db migrations
No need to rename the table CE_TASK_DATA to CE_TASK_INPUT. It can
be directly created with the correct name.
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_input.rb (renamed from server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_data.rb) | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1305_drop_index_ce_task_data_uuid.rb | 33 | ||||
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1306_rename_ce_task_data_to_ce_task_input.rb | 30 | ||||
-rw-r--r-- | sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql | 1 |
4 files changed, 3 insertions, 67 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_data.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_input.rb index 73038de8329..b1288272ea0 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_data.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_input.rb @@ -21,15 +21,15 @@ # # SonarQube 6.1 # -class CreateTableCeTaskData < ActiveRecord::Migration +class CreateTableCeTaskInput < ActiveRecord::Migration def self.up - create_table 'ce_task_data', :id => false do |t| + create_table 'ce_task_input', :id => false do |t| t.column 'task_uuid', :string, :limit => 40, :null => false t.column 'data', :binary, :null => true t.column 'created_at', :big_integer, :null => false t.column 'updated_at', :big_integer, :null => false end - add_index 'ce_task_data', 'task_uuid', :name => 'ce_task_data_uuid', :unique => true + add_index 'ce_task_input', 'task_uuid', :name => 'ce_task_input_uuid', :unique => true end end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1305_drop_index_ce_task_data_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1305_drop_index_ce_task_data_uuid.rb deleted file mode 100644 index 9071519dc36..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1305_drop_index_ce_task_data_uuid.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2014 SonarSource -# mailto:contact AT sonarsource DOT com -# -# SonarQube 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. -# -# SonarQube 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 this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -# -# SonarQube 6.1 -# -class DropIndexCeTaskDataUuid < ActiveRecord::Migration - - def self.up - begin - remove_index :ce_task_data, :name => 'ce_task_data_uuid' - rescue - #ignore - end - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1306_rename_ce_task_data_to_ce_task_input.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1306_rename_ce_task_data_to_ce_task_input.rb deleted file mode 100644 index 59f5eff810f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1306_rename_ce_task_data_to_ce_task_input.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# SonarQube, open source software quality management tool. -# Copyright (C) 2008-2014 SonarSource -# mailto:contact AT sonarsource DOT com -# -# SonarQube 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. -# -# SonarQube 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 this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -# -# SonarQube 6.1 -# -class RenameCeTaskDataToCeTaskInput < ActiveRecord::Migration - - def self.up - rename_table 'ce_task_data', 'ce_task_input' - add_index 'ce_task_input', 'task_uuid', :name => 'ce_task_input_uuid', :unique => true - end -end diff --git a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql b/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql index 805e21cd2b2..9070689515f 100644 --- a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql +++ b/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql @@ -491,7 +491,6 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1301'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1302'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1303'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1304'); -INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1305'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1306'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1307'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1308'); |