From b08f9808b49c04c9153ff3096cef73170ea232a6 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 4 Dec 2014 17:41:10 +0100 Subject: [PATCH] Minor refactoring in 713_create_file_sources.rb --- .../WEB-INF/db/migrate/713_create_file_sources.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/713_create_file_sources.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/713_create_file_sources.rb index ae7e45aecf9..1820e207299 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/713_create_file_sources.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/713_create_file_sources.rb @@ -35,17 +35,13 @@ class CreateFileSources < ActiveRecord::Migration end if dialect()=='mysql' - ActiveRecord::Base.connection.execute("alter table file_sources modify data longtext") + ActiveRecord::Base.connection.execute('alter table file_sources modify data longtext') end - add_index "file_sources", "file_uuid", :unique => true, :name => "file_sources_file_uuid_uniq" + add_index 'file_sources', 'file_uuid', :unique => true, :name => 'file_sources_file_uuid' - ["project_uuid", "updated_at"].each do |column| - begin - add_index "file_sources", column, :name => "file_sources_" + column - rescue - # ignore - end + ['project_uuid', 'updated_at'].each do |column| + add_index 'file_sources', column, :name => 'file_sources_' + column end end -- 2.39.5