mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Disable migrate_to_new_scheme once there is nothing to migrate.
This commit is contained in:
parent
2e346e6ea2
commit
573ddcbbd0
@ -212,6 +212,12 @@ class Upload < ActiveRecord::Base
|
|||||||
scope = Upload.by_users.where("url NOT LIKE '%/original/_X/%' AND url LIKE '%/uploads/#{RailsMultisite::ConnectionManagement.current_db}%'").order(id: :desc)
|
scope = Upload.by_users.where("url NOT LIKE '%/original/_X/%' AND url LIKE '%/uploads/#{RailsMultisite::ConnectionManagement.current_db}%'").order(id: :desc)
|
||||||
|
|
||||||
scope = scope.limit(limit) if limit
|
scope = scope.limit(limit) if limit
|
||||||
|
|
||||||
|
if scope.count == 0
|
||||||
|
SiteSetting.migrate_to_new_scheme = false
|
||||||
|
return problems
|
||||||
|
end
|
||||||
|
|
||||||
remap_scope = nil
|
remap_scope = nil
|
||||||
|
|
||||||
scope.each do |upload|
|
scope.each do |upload|
|
||||||
|
Loading…
Reference in New Issue
Block a user