From: Simon Brandhof Date: Fri, 15 Jul 2016 08:03:38 +0000 (+0200) Subject: SONAR-7786 Create index measures_analysis_metric earlier X-Git-Tag: 6.0-RC1~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a5ab07be6c4a88715e0747364e2d0c843b1ad90c;p=sonarqube.git SONAR-7786 Create index measures_analysis_metric earlier so that other migrations can benefit from it --- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1210_clean_orphan_rows_in_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1210_clean_orphan_rows_in_snapshots.rb deleted file mode 100644 index 5f29a5bbeb2..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1210_clean_orphan_rows_in_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class CleanOrphanRowsInSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.CleanOrphanRowsInSnapshots') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1210_create_temporary_indices_for_1211.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1210_create_temporary_indices_for_1211.rb new file mode 100644 index 00000000000..49cf234b3bd --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1210_create_temporary_indices_for_1211.rb @@ -0,0 +1,30 @@ +# +# 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.0 +# +class CreateTemporaryIndicesFor1211 < ActiveRecord::Migration + + def self.up + add_index :ce_activity, :snapshot_id, :name => 'ce_activity_snapshot_id' + add_index :duplications_index, :project_snapshot_id, :name => 'dup_index_psid' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1211_clean_orphan_rows_in_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1211_clean_orphan_rows_in_snapshots.rb new file mode 100644 index 00000000000..5f29a5bbeb2 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1211_clean_orphan_rows_in_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class CleanOrphanRowsInSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.CleanOrphanRowsInSnapshots') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1211_make_component_uuid_columns_not_null_on_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1211_make_component_uuid_columns_not_null_on_snapshots.rb deleted file mode 100644 index 29c328e6aeb..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1211_make_component_uuid_columns_not_null_on_snapshots.rb +++ /dev/null @@ -1,32 +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.0 -# -class MakeComponentUuidColumnsNotNullOnSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.MakeComponentUuidColumnsNotNullOnSnapshots') - - add_index :snapshots, :component_uuid, :name => 'snapshot_component' - add_index :snapshots, :root_component_uuid, :name => 'snapshot_root_component' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb deleted file mode 100644 index 3bc97373bce..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb +++ /dev/null @@ -1,38 +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.0 -# -class DropSnapshotProjectIdFromSnapshots < ActiveRecord::Migration - - def self.up - begin - remove_index :snapshots, :name => 'snapshot_project_id' - rescue - #ignore - end - begin - remove_index :snapshots, :name => 'snapshots_root_project_id' - rescue - #ignore - end - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_temporary_indices_of_1210.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_temporary_indices_of_1210.rb new file mode 100644 index 00000000000..a711d441c28 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_temporary_indices_of_1210.rb @@ -0,0 +1,40 @@ +# +# 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.0 +# +class DropTemporaryIndicesOf1210 < ActiveRecord::Migration + + def self.up + drop_index_quietly :ce_activity, 'ce_activity_snapshot_id' + drop_index_quietly :duplications_index, 'dup_index_psid' + end + + private + + def self.drop_index_quietly(table, index) + begin + remove_index table, :name => index + rescue + #ignore + end + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1213_drop_id_columns_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1213_drop_id_columns_from_snapshots.rb deleted file mode 100644 index 5840012cdf1..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1213_drop_id_columns_from_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class DropIdColumnsFromSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropIdColumnsFromSnapshots') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1213_make_component_uuid_columns_not_null_on_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1213_make_component_uuid_columns_not_null_on_snapshots.rb new file mode 100644 index 00000000000..29c328e6aeb --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1213_make_component_uuid_columns_not_null_on_snapshots.rb @@ -0,0 +1,32 @@ +# +# 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.0 +# +class MakeComponentUuidColumnsNotNullOnSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.MakeComponentUuidColumnsNotNullOnSnapshots') + + add_index :snapshots, :component_uuid, :name => 'snapshot_component' + add_index :snapshots, :root_component_uuid, :name => 'snapshot_root_component' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1214_add_component_uuid_to_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1214_add_component_uuid_to_measures.rb deleted file mode 100644 index 53279d50310..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1214_add_component_uuid_to_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddComponentUuidToMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.AddComponentUuidColumnToMeasures') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1214_drop_snapshot_project_id_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1214_drop_snapshot_project_id_from_snapshots.rb new file mode 100644 index 00000000000..3bc97373bce --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1214_drop_snapshot_project_id_from_snapshots.rb @@ -0,0 +1,38 @@ +# +# 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.0 +# +class DropSnapshotProjectIdFromSnapshots < ActiveRecord::Migration + + def self.up + begin + remove_index :snapshots, :name => 'snapshot_project_id' + rescue + #ignore + end + begin + remove_index :snapshots, :name => 'snapshots_root_project_id' + rescue + #ignore + end + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1215_drop_id_columns_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1215_drop_id_columns_from_snapshots.rb new file mode 100644 index 00000000000..5840012cdf1 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1215_drop_id_columns_from_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DropIdColumnsFromSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropIdColumnsFromSnapshots') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1215_populate_component_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1215_populate_component_uuid_of_measures.rb deleted file mode 100644 index 55a6a8b24ed..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1215_populate_component_uuid_of_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class PopulateComponentUuidOfMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.PopulateComponentUuidOfMeasures') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1216_add_component_uuid_to_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1216_add_component_uuid_to_measures.rb new file mode 100644 index 00000000000..53279d50310 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1216_add_component_uuid_to_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddComponentUuidToMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.AddComponentUuidColumnToMeasures') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1216_delete_orphan_measures_without_component.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1216_delete_orphan_measures_without_component.rb deleted file mode 100644 index e94e0a7721e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1216_delete_orphan_measures_without_component.rb +++ /dev/null @@ -1,29 +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.0 -# -class DeleteOrphanMeasuresWithoutComponent < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DeleteOrphanMeasuresWithoutComponent') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1217_make_component_uuid_not_null_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1217_make_component_uuid_not_null_on_measures.rb deleted file mode 100644 index 5de3fec2f84..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1217_make_component_uuid_not_null_on_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class MakeComponentUuidNotNullOnMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.MakeComponentUuidNotNullOnMeasures') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1217_populate_component_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1217_populate_component_uuid_of_measures.rb new file mode 100644 index 00000000000..55a6a8b24ed --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1217_populate_component_uuid_of_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class PopulateComponentUuidOfMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.PopulateComponentUuidOfMeasures') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1218_delete_orphan_measures_without_component.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1218_delete_orphan_measures_without_component.rb new file mode 100644 index 00000000000..e94e0a7721e --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1218_delete_orphan_measures_without_component.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DeleteOrphanMeasuresWithoutComponent < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DeleteOrphanMeasuresWithoutComponent') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1218_drop_project_id_column_from_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1218_drop_project_id_column_from_measures.rb deleted file mode 100644 index 706d60b4094..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1218_drop_project_id_column_from_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class DropProjectIdColumnFromMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropProjectIdColumnFromMeasures') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1219_add_index_on_component_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1219_add_index_on_component_uuid_of_measures.rb deleted file mode 100644 index 2dabb9af413..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1219_add_index_on_component_uuid_of_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddIndexOnComponentUuidOfMeasures < ActiveRecord::Migration - - def self.up - add_index :project_measures, :component_uuid, :name => 'measures_component_uuid' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1219_make_component_uuid_not_null_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1219_make_component_uuid_not_null_on_measures.rb new file mode 100644 index 00000000000..5de3fec2f84 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1219_make_component_uuid_not_null_on_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class MakeComponentUuidNotNullOnMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.MakeComponentUuidNotNullOnMeasures') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1220_drop_project_id_column_from_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1220_drop_project_id_column_from_measures.rb new file mode 100644 index 00000000000..706d60b4094 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1220_drop_project_id_column_from_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DropProjectIdColumnFromMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropProjectIdColumnFromMeasures') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1220_drop_remember_me_columns_from_users.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1220_drop_remember_me_columns_from_users.rb deleted file mode 100644 index 5c90e273898..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1220_drop_remember_me_columns_from_users.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.0 -# SONAR-7739 -# -class DropRememberMeColumnsFromUsers < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropRememberMeColumnsFromUsers') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1221_add_index_on_component_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1221_add_index_on_component_uuid_of_measures.rb new file mode 100644 index 00000000000..2dabb9af413 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1221_add_index_on_component_uuid_of_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddIndexOnComponentUuidOfMeasures < ActiveRecord::Migration + + def self.up + add_index :project_measures, :component_uuid, :name => 'measures_component_uuid' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1221_clean_some_data_in_table_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1221_clean_some_data_in_table_projects.rb deleted file mode 100644 index 092e14726fb..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1221_clean_some_data_in_table_projects.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.0 -# -class CleanSomeDataInTableProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.FixProjectUuidOfDeveloperProjects') - execute_java_migration('org.sonar.db.version.v60.CleanUsurperRootComponents') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1222_add_uuid_columns_to_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1222_add_uuid_columns_to_projects.rb deleted file mode 100644 index 95fa9837b59..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1222_add_uuid_columns_to_projects.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddUuidColumnsToProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.AddUuidColumnsToProjects') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1222_drop_remember_me_columns_from_users.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1222_drop_remember_me_columns_from_users.rb new file mode 100644 index 00000000000..5c90e273898 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1222_drop_remember_me_columns_from_users.rb @@ -0,0 +1,30 @@ +# +# 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.0 +# SONAR-7739 +# +class DropRememberMeColumnsFromUsers < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropRememberMeColumnsFromUsers') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1223_clean_some_data_in_table_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1223_clean_some_data_in_table_projects.rb new file mode 100644 index 00000000000..092e14726fb --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1223_clean_some_data_in_table_projects.rb @@ -0,0 +1,30 @@ +# +# 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.0 +# +class CleanSomeDataInTableProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.FixProjectUuidOfDeveloperProjects') + execute_java_migration('org.sonar.db.version.v60.CleanUsurperRootComponents') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1223_populate_uuid_columns_of_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1223_populate_uuid_columns_of_projects.rb deleted file mode 100644 index b67091182d3..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1223_populate_uuid_columns_of_projects.rb +++ /dev/null @@ -1,29 +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.0 -# -class PopulateUuidColumnsOfProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.PopulateUuidColumnsOfProjects') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1224_add_uuid_columns_to_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1224_add_uuid_columns_to_projects.rb new file mode 100644 index 00000000000..95fa9837b59 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1224_add_uuid_columns_to_projects.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddUuidColumnsToProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.AddUuidColumnsToProjects') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1224_clean_orphan_rows_in_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1224_clean_orphan_rows_in_projects.rb deleted file mode 100644 index 0f063102b03..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1224_clean_orphan_rows_in_projects.rb +++ /dev/null @@ -1,29 +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.0 -# -class CleanOrphanRowsInProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.CleanOrphanRowsInProjects') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1225_drop_index_projects_uuid_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1225_drop_index_projects_uuid_from_projects.rb deleted file mode 100644 index 6305a0d80d6..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1225_drop_index_projects_uuid_from_projects.rb +++ /dev/null @@ -1,34 +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.0 -# -class DropIndexProjectsUuidFromProjects < ActiveRecord::Migration - - def self.up - begin - remove_index :projects, :name => 'projects_uuid' - rescue - #ignore - end - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1225_populate_uuid_columns_of_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1225_populate_uuid_columns_of_projects.rb new file mode 100644 index 00000000000..b67091182d3 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1225_populate_uuid_columns_of_projects.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class PopulateUuidColumnsOfProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.PopulateUuidColumnsOfProjects') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_clean_orphan_rows_in_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_clean_orphan_rows_in_projects.rb new file mode 100644 index 00000000000..0f063102b03 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_clean_orphan_rows_in_projects.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class CleanOrphanRowsInProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.CleanOrphanRowsInProjects') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_make_uuid_columns_not_null_on_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_make_uuid_columns_not_null_on_projects.rb deleted file mode 100644 index 2db8db3f4ba..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_make_uuid_columns_not_null_on_projects.rb +++ /dev/null @@ -1,31 +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.0 -# -class MakeUuidColumnsNotNullOnProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.MakeUuidColumnsNotNullOnProjects') - - add_index :projects, :root_uuid, :name => 'projects_root_uuid' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1227_drop_index_projects_uuid_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1227_drop_index_projects_uuid_from_projects.rb new file mode 100644 index 00000000000..6305a0d80d6 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1227_drop_index_projects_uuid_from_projects.rb @@ -0,0 +1,34 @@ + +# +# 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.0 +# +class DropIndexProjectsUuidFromProjects < ActiveRecord::Migration + + def self.up + begin + remove_index :projects, :name => 'projects_uuid' + rescue + #ignore + end + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1227_recreate_index_projects_uuid_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1227_recreate_index_projects_uuid_from_projects.rb deleted file mode 100644 index f9f6fbad51c..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1227_recreate_index_projects_uuid_from_projects.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.0 -# -class RecreateIndexProjectsUuidFromProjects < ActiveRecord::Migration - - def self.up - add_index :projects, :uuid, :name => 'projects_uuid' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1228_drop_index_projects_root_id_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1228_drop_index_projects_root_id_from_projects.rb deleted file mode 100644 index 038b01da20e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1228_drop_index_projects_root_id_from_projects.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.0 -# -class DropIndexProjectsRootIdFromProjects < ActiveRecord::Migration - - def self.up - begin - remove_index :projects, :name => 'projects_root_id' - rescue - #ignore - end - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1228_make_uuid_columns_not_null_on_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1228_make_uuid_columns_not_null_on_projects.rb new file mode 100644 index 00000000000..2db8db3f4ba --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1228_make_uuid_columns_not_null_on_projects.rb @@ -0,0 +1,31 @@ +# +# 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.0 +# +class MakeUuidColumnsNotNullOnProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.MakeUuidColumnsNotNullOnProjects') + + add_index :projects, :root_uuid, :name => 'projects_root_uuid' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1229_drop_id_columns_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1229_drop_id_columns_from_projects.rb deleted file mode 100644 index 6266cdad3fa..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1229_drop_id_columns_from_projects.rb +++ /dev/null @@ -1,29 +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.0 -# -class DropIdColumnsFromProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropIdColumnsFromProjects') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1229_recreate_index_projects_uuid_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1229_recreate_index_projects_uuid_from_projects.rb new file mode 100644 index 00000000000..f9f6fbad51c --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1229_recreate_index_projects_uuid_from_projects.rb @@ -0,0 +1,30 @@ + +# +# 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.0 +# +class RecreateIndexProjectsUuidFromProjects < ActiveRecord::Migration + + def self.up + add_index :projects, :uuid, :name => 'projects_uuid' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1230_add_uuid_column_to_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1230_add_uuid_column_to_snapshots.rb deleted file mode 100644 index 10d61c8e83e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1230_add_uuid_column_to_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddUuidColumnToSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.AddUuidColumnToSnapshots') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1230_drop_index_projects_root_id_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1230_drop_index_projects_root_id_from_projects.rb new file mode 100644 index 00000000000..038b01da20e --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1230_drop_index_projects_root_id_from_projects.rb @@ -0,0 +1,33 @@ +# +# 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.0 +# +class DropIndexProjectsRootIdFromProjects < ActiveRecord::Migration + + def self.up + begin + remove_index :projects, :name => 'projects_root_id' + rescue + #ignore + end + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1231_drop_id_columns_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1231_drop_id_columns_from_projects.rb new file mode 100644 index 00000000000..6266cdad3fa --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1231_drop_id_columns_from_projects.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DropIdColumnsFromProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropIdColumnsFromProjects') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1231_populate_uuid_column_on_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1231_populate_uuid_column_on_snapshots.rb deleted file mode 100644 index fe409fe9b39..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1231_populate_uuid_column_on_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class PopulateUuidColumnOnSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.PopulateUuidColumnOnSnapshots') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1232_add_uuid_column_to_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1232_add_uuid_column_to_snapshots.rb new file mode 100644 index 00000000000..10d61c8e83e --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1232_add_uuid_column_to_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddUuidColumnToSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.AddUuidColumnToSnapshots') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1232_make_uuid_column_not_null_on_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1232_make_uuid_column_not_null_on_snapshots.rb deleted file mode 100644 index d7baeef61cd..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1232_make_uuid_column_not_null_on_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class MakeUuidColumnNotNullOnSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.MakeUuidColumnNotNullOnSnapshots') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1233_add_unique_index_on_uuid_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1233_add_unique_index_on_uuid_of_snapshots.rb deleted file mode 100644 index 5a66c1d7759..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1233_add_unique_index_on_uuid_of_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddUniqueIndexOnUuidOfSnapshots < ActiveRecord::Migration - - def self.up - add_index :snapshots, :uuid, :name => 'analyses_uuid', :unique => true - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1233_populate_uuid_column_on_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1233_populate_uuid_column_on_snapshots.rb new file mode 100644 index 00000000000..fe409fe9b39 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1233_populate_uuid_column_on_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class PopulateUuidColumnOnSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.PopulateUuidColumnOnSnapshots') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1234_add_analysis_uuid_column_to_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1234_add_analysis_uuid_column_to_ce_activity.rb deleted file mode 100644 index 8f25ffedab8..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1234_add_analysis_uuid_column_to_ce_activity.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddAnalysisUuidColumnToCeActivity < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.AddAnalysisUuidColumnToCeActivity') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1234_make_uuid_column_not_null_on_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1234_make_uuid_column_not_null_on_snapshots.rb new file mode 100644 index 00000000000..d7baeef61cd --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1234_make_uuid_column_not_null_on_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class MakeUuidColumnNotNullOnSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.MakeUuidColumnNotNullOnSnapshots') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1235_add_unique_index_on_uuid_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1235_add_unique_index_on_uuid_of_snapshots.rb new file mode 100644 index 00000000000..5a66c1d7759 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1235_add_unique_index_on_uuid_of_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddUniqueIndexOnUuidOfSnapshots < ActiveRecord::Migration + + def self.up + add_index :snapshots, :uuid, :name => 'analyses_uuid', :unique => true + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1235_populate_analysis_uuid_column_on_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1235_populate_analysis_uuid_column_on_ce_activity.rb deleted file mode 100644 index d2642bd9b6f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1235_populate_analysis_uuid_column_on_ce_activity.rb +++ /dev/null @@ -1,29 +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.0 -# -class PopulateAnalysisUuidColumnOnCeActivity < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.PopulateAnalysisUuidColumnOnCeActivity') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1236_add_analysis_uuid_column_to_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1236_add_analysis_uuid_column_to_ce_activity.rb new file mode 100644 index 00000000000..8f25ffedab8 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1236_add_analysis_uuid_column_to_ce_activity.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddAnalysisUuidColumnToCeActivity < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.AddAnalysisUuidColumnToCeActivity') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1236_drop_snapshot_id_column_from_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1236_drop_snapshot_id_column_from_ce_activity.rb deleted file mode 100644 index ff454ce01bb..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1236_drop_snapshot_id_column_from_ce_activity.rb +++ /dev/null @@ -1,29 +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.0 -# -class DropSnapshotIdColumnFromCeActivity < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropSnapshotIdColumnFromCeActivity') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1237_add_component_uuid_and_analysis_uuid_to_duplications_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1237_add_component_uuid_and_analysis_uuid_to_duplications_index.rb deleted file mode 100644 index 6cd915e449f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1237_add_component_uuid_and_analysis_uuid_to_duplications_index.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddComponentUuidAndAnalysisUuidToDuplicationsIndex < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndex') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1237_populate_analysis_uuid_column_on_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1237_populate_analysis_uuid_column_on_ce_activity.rb new file mode 100644 index 00000000000..d2642bd9b6f --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1237_populate_analysis_uuid_column_on_ce_activity.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class PopulateAnalysisUuidColumnOnCeActivity < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.PopulateAnalysisUuidColumnOnCeActivity') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1238_drop_snapshot_id_column_from_ce_activity.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1238_drop_snapshot_id_column_from_ce_activity.rb new file mode 100644 index 00000000000..ff454ce01bb --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1238_drop_snapshot_id_column_from_ce_activity.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DropSnapshotIdColumnFromCeActivity < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropSnapshotIdColumnFromCeActivity') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1238_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1238_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb deleted file mode 100644 index 4e30c48a92f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1238_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb +++ /dev/null @@ -1,29 +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.0 -# -class PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndex < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndex') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1239_add_component_uuid_and_analysis_uuid_to_duplications_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1239_add_component_uuid_and_analysis_uuid_to_duplications_index.rb new file mode 100644 index 00000000000..6cd915e449f --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1239_add_component_uuid_and_analysis_uuid_to_duplications_index.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddComponentUuidAndAnalysisUuidToDuplicationsIndex < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.AddComponentUuidAndAnalysisUuidColumnToDuplicationsIndex') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1239_delete_orphan_duplications_index_rows_without_component_or_analysis.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1239_delete_orphan_duplications_index_rows_without_component_or_analysis.rb deleted file mode 100644 index a869ada9f28..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1239_delete_orphan_duplications_index_rows_without_component_or_analysis.rb +++ /dev/null @@ -1,29 +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.0 -# -class DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1240_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1240_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb deleted file mode 100644 index ff6268c7e97..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1240_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb +++ /dev/null @@ -1,31 +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.0 -# -class MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndex < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndex') - - add_index :duplications_index, [:analysis_uuid, :component_uuid], :name => 'duplication_analysis_component' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1240_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1240_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb new file mode 100644 index 00000000000..4e30c48a92f --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1240_populate_component_uuid_and_analysis_uuid_of_duplications_index.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndex < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.PopulateComponentUuidAndAnalysisUuidOfDuplicationsIndex') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1241_delete_orphan_duplications_index_rows_without_component_or_analysis.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1241_delete_orphan_duplications_index_rows_without_component_or_analysis.rb new file mode 100644 index 00000000000..a869ada9f28 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1241_delete_orphan_duplications_index_rows_without_component_or_analysis.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DeleteOrphanDuplicationsIndexRowsWithoutComponentOrAnalysis') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1242_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1242_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb new file mode 100644 index 00000000000..ff6268c7e97 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1242_make_component_uuid_and_analysis_uuid_not_null_on_duplications_index.rb @@ -0,0 +1,31 @@ +# +# 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.0 +# +class MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndex < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.MakeComponentUuidAndAnalysisUuidNotNullOnDuplicationsIndex') + + add_index :duplications_index, [:analysis_uuid, :component_uuid], :name => 'duplication_analysis_component' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1266_add_index_on_analysis_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1266_add_index_on_analysis_uuid_of_measures.rb new file mode 100644 index 00000000000..32ca43685f9 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1266_add_index_on_analysis_uuid_of_measures.rb @@ -0,0 +1,30 @@ +# +# 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.0 +# +class AddIndexOnAnalysisUuidOfMeasures < ActiveRecord::Migration + + def self.up + # this index must be present for the performance of next migration + add_index :project_measures, [:analysis_uuid, :metric_id], :name => 'measures_analysis_metric' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1266_populate_analysis_uuid_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1266_populate_analysis_uuid_on_measures.rb deleted file mode 100644 index 8e4858914f6..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1266_populate_analysis_uuid_on_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class PopulateAnalysisUuidOnMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.PopulateAnalysisUuidOnMeasures') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1267_clean_measures_with_null_analysis_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1267_clean_measures_with_null_analysis_uuid.rb deleted file mode 100644 index 7cfe63afcb9..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1267_clean_measures_with_null_analysis_uuid.rb +++ /dev/null @@ -1,29 +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.0 -# -class CleanMeasuresWithNullAnalysisUuid < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.CleanMeasuresWithNullAnalysisUuid') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1267_populate_analysis_uuid_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1267_populate_analysis_uuid_on_measures.rb new file mode 100644 index 00000000000..8e4858914f6 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1267_populate_analysis_uuid_on_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class PopulateAnalysisUuidOnMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.PopulateAnalysisUuidOnMeasures') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1268_clean_measures_with_null_analysis_uuid.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1268_clean_measures_with_null_analysis_uuid.rb new file mode 100644 index 00000000000..7cfe63afcb9 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1268_clean_measures_with_null_analysis_uuid.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class CleanMeasuresWithNullAnalysisUuid < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.CleanMeasuresWithNullAnalysisUuid') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1268_make_analysis_uuid_not_null_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1268_make_analysis_uuid_not_null_on_measures.rb deleted file mode 100644 index 2faf467f2d3..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1268_make_analysis_uuid_not_null_on_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class MakeAnalysisUuidNotNullOnMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.MakeAnalysisUuidNotNullOnMeasures') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1269_temporarily_drop_index_of_analysis_uuid_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1269_temporarily_drop_index_of_analysis_uuid_on_measures.rb new file mode 100644 index 00000000000..42d47590c1f --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1269_temporarily_drop_index_of_analysis_uuid_on_measures.rb @@ -0,0 +1,31 @@ +# +# 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.0 +# +class TemporarilyDropIndexOfAnalysisUuidOnMeasures < ActiveRecord::Migration + + def self.up + # the index must be dropped for the compatibility of migration 1270 + # with MSSQL + remove_index :project_measures, :name => 'measures_analysis_metric' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_trees_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_trees_of_snapshots.rb deleted file mode 100644 index 450313f47bf..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_trees_of_snapshots.rb +++ /dev/null @@ -1,29 +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.0 -# -class DropTreesOfSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropTreesOfSnapshots') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_make_analysis_uuid_not_null_on_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_make_analysis_uuid_not_null_on_measures.rb new file mode 100644 index 00000000000..2faf467f2d3 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_make_analysis_uuid_not_null_on_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class MakeAnalysisUuidNotNullOnMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.MakeAnalysisUuidNotNullOnMeasures') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_add_again_index_on_analysis_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_add_again_index_on_analysis_uuid_of_measures.rb new file mode 100644 index 00000000000..858bf8e7b2c --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_add_again_index_on_analysis_uuid_of_measures.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddAgainIndexOnAnalysisUuidOfMeasures < ActiveRecord::Migration + + def self.up + add_index :project_measures, [:analysis_uuid, :metric_id], :name => 'measures_analysis_metric' + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_drop_indices_on_tree_columns_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_drop_indices_on_tree_columns_of_snapshots.rb deleted file mode 100644 index 56067d8419f..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_drop_indices_on_tree_columns_of_snapshots.rb +++ /dev/null @@ -1,41 +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.0 -# -class DropIndicesOnTreeColumnsOfSnapshots < ActiveRecord::Migration - - def self.up - remove_index_quietly 'snapshots_qualifier' - remove_index_quietly 'snapshots_root' - remove_index_quietly 'snapshots_parent' - remove_index_quietly 'snapshot_root_component' - end - - private - def self.remove_index_quietly(index_name) - begin - remove_index :snapshots, :name => index_name - rescue - #ignore - end - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_tree_columns_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_tree_columns_from_snapshots.rb deleted file mode 100644 index 262b376f175..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_tree_columns_from_snapshots.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.0 -# -class DropTreeColumnsFromSnapshots < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropTreeColumnsFromSnapshots') - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_trees_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_trees_of_snapshots.rb new file mode 100644 index 00000000000..450313f47bf --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_trees_of_snapshots.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class DropTreesOfSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropTreesOfSnapshots') + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_index_on_snapshot_id_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_index_on_snapshot_id_of_measures.rb deleted file mode 100644 index d37b1000d97..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_index_on_snapshot_id_of_measures.rb +++ /dev/null @@ -1,34 +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.0 -# -class DropIndexOnSnapshotIdOfMeasures < ActiveRecord::Migration - - def self.up - begin - remove_index :project_measures, :name => 'measures_sid_metric' - rescue - #ignore - end - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_indices_on_tree_columns_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_indices_on_tree_columns_of_snapshots.rb new file mode 100644 index 00000000000..56067d8419f --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_indices_on_tree_columns_of_snapshots.rb @@ -0,0 +1,41 @@ +# +# 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.0 +# +class DropIndicesOnTreeColumnsOfSnapshots < ActiveRecord::Migration + + def self.up + remove_index_quietly 'snapshots_qualifier' + remove_index_quietly 'snapshots_root' + remove_index_quietly 'snapshots_parent' + remove_index_quietly 'snapshot_root_component' + end + + private + def self.remove_index_quietly(index_name) + begin + remove_index :snapshots, :name => index_name + rescue + #ignore + end + end +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_drop_snapshot_id_column_from_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_drop_snapshot_id_column_from_measures.rb deleted file mode 100644 index 8822b7c916e..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_drop_snapshot_id_column_from_measures.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.0 -# -class DropSnapshotIdColumnFromMeasures < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.DropSnapshotIdColumnFromMeasures') - end - -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_drop_tree_columns_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_drop_tree_columns_from_snapshots.rb new file mode 100644 index 00000000000..262b376f175 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_drop_tree_columns_from_snapshots.rb @@ -0,0 +1,30 @@ +# +# 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.0 +# +class DropTreeColumnsFromSnapshots < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropTreeColumnsFromSnapshots') + end + +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1275_add_index_on_analysis_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1275_add_index_on_analysis_uuid_of_measures.rb deleted file mode 100644 index f2ad93b0193..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1275_add_index_on_analysis_uuid_of_measures.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddIndexOnAnalysisUuidOfMeasures < ActiveRecord::Migration - - def self.up - add_index :project_measures, [:analysis_uuid, :metric_id], :name => 'measures_analysis_metric' - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1275_drop_index_on_snapshot_id_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1275_drop_index_on_snapshot_id_of_measures.rb new file mode 100644 index 00000000000..d37b1000d97 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1275_drop_index_on_snapshot_id_of_measures.rb @@ -0,0 +1,34 @@ +# +# 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.0 +# +class DropIndexOnSnapshotIdOfMeasures < ActiveRecord::Migration + + def self.up + begin + remove_index :project_measures, :name => 'measures_sid_metric' + rescue + #ignore + end + end + +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1276_add_b_columns_to_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1276_add_b_columns_to_projects.rb deleted file mode 100644 index 74a5b43c053..00000000000 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1276_add_b_columns_to_projects.rb +++ /dev/null @@ -1,29 +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.0 -# -class AddBColumnsToProjects < ActiveRecord::Migration - - def self.up - execute_java_migration('org.sonar.db.version.v60.AddBColumnsToProjects') - end -end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1276_drop_snapshot_id_column_from_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1276_drop_snapshot_id_column_from_measures.rb new file mode 100644 index 00000000000..8822b7c916e --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1276_drop_snapshot_id_column_from_measures.rb @@ -0,0 +1,30 @@ +# +# 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.0 +# +class DropSnapshotIdColumnFromMeasures < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.DropSnapshotIdColumnFromMeasures') + end + +end diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1277_add_b_columns_to_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1277_add_b_columns_to_projects.rb new file mode 100644 index 00000000000..74a5b43c053 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1277_add_b_columns_to_projects.rb @@ -0,0 +1,29 @@ +# +# 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.0 +# +class AddBColumnsToProjects < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v60.AddBColumnsToProjects') + end +end diff --git a/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java b/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java index 796c16e5954..e8b30543628 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java +++ b/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java @@ -30,7 +30,7 @@ import org.sonar.db.MyBatis; public class DatabaseVersion { - public static final int LAST_VERSION = 1_276; + public static final int LAST_VERSION = 1_277; /** * The minimum supported version which can be upgraded. Lower 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 fff413c49dd..ea257a66f8b 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 @@ -484,6 +484,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1273'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1274'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1275'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1276'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1277'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, EXTERNAL_IDENTITY, EXTERNAL_IDENTITY_PROVIDER, USER_LOCAL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT) VALUES (1, 'admin', 'Administrator', '', 'admin', 'sonarqube', true, 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482'); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;