From: Simon Brandhof Date: Mon, 22 Aug 2016 21:42:57 +0000 (+0200) Subject: SONAR-7903 merge db migrations X-Git-Tag: 6.1-RC1~324 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=01056ae8db1ba68f563ee36b385f8eaf24fa0562;p=sonarqube.git 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. --- 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_data.rb deleted file mode 100644 index 73038de8329..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_data.rb +++ /dev/null @@ -1,35 +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 CreateTableCeTaskData < ActiveRecord::Migration - - def self.up - create_table 'ce_task_data', :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 - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_input.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_input.rb new file mode 100644 index 00000000000..b1288272ea0 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1302_create_table_ce_task_input.rb @@ -0,0 +1,35 @@ +# +# 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 CreateTableCeTaskInput < ActiveRecord::Migration + + def self.up + 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_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');