diff --git a/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb new file mode 100644 index 00000000..060cad94 --- /dev/null +++ b/db/migrate/20190626161150_modify_request_limit_for_shixun_service_config.rb @@ -0,0 +1,15 @@ +class ModifyRequestLimitForShixunServiceConfig < ActiveRecord::Migration + def up + ShixunServiceConfig.find_each do |config| + # repertoire_id = 5 代表的是大数据的镜像 + if config.mirror_repository.repertoire_id != 5 + config.update_column(:request_limit, 10) + else + puts("####---#{config.mirror_repository.name}") + end + end + end + + def down + end +end