[CodeFactor] Apply fixes to commit 17fa995

This commit is contained in:
codefactor-io
2019-12-26 03:06:15 +00:00
committed by Brenda Wallace
parent aab345cf09
commit a595a2cd8e
2 changed files with 6 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class CropHarvestCounterCache < ActiveRecord::Migration[5.2]
def change
change_table :crops do |t|
@@ -7,6 +9,7 @@ class CropHarvestCounterCache < ActiveRecord::Migration[5.2]
dir.up { set_counter_value }
end
end
def set_counter_value
execute <<-SQL.squish
UPDATE crops

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
class CropPhotoCounterCache < ActiveRecord::Migration[5.2]
def change
change_table :crops do |t|
@@ -7,6 +9,7 @@ class CropPhotoCounterCache < ActiveRecord::Migration[5.2]
dir.up { set_counter_value }
end
end
def set_counter_value
execute <<-SQL.squish
UPDATE crops