Browse Source

添加laboratory_setting_id_index

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
b218ced077
2 changed files with 6 additions and 10 deletions
  1. +1
    -10
      app/services/admins/save_laboratory_setting_service.rb
  2. +5
    -0
      db/migrate/20200417094626_add_laboratory_setting_id_index.rb

+ 1
- 10
app/services/admins/save_laboratory_setting_service.rb 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


+ 5
- 0
db/migrate/20200417094626_add_laboratory_setting_id_index.rb 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

Loading…
Cancel
Save