添加laboratory_setting_id_index

This commit is contained in:
sylor_huang@126.com 2020-04-17 17:47:42 +08:00
parent aa6482fd29
commit b218ced077
2 changed files with 6 additions and 10 deletions

View File

@ -15,16 +15,7 @@ class Admins::SaveLaboratorySettingService < ApplicationService
laboratory_setting.footer = strip params[:footer]
laboratory.save!
begin
unless laboratory_setting.save!
Rails.logger.info("######__ddddd________#######{laboratory_setting.errors.messages}")
end
rescue => e
Rails.logger.info("######__________#######{e}")
end
laboratory_setting.save!
deal_image_file
end

View File

@ -0,0 +1,5 @@
class AddLaboratorySettingIdIndex < ActiveRecord::Migration[5.2]
def change
execute "ALTER TABLE laboratory_settings ADD PRIMARY KEY (id);"
end
end