FIX: Make initializer work on first db:migrate

Follow-up to 94607a2f
This commit is contained in:
Gerhard Schlager 2019-07-30 10:23:24 +02:00
parent 94607a2f6b
commit 03d28342f8
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ if generate_vapid_key?
SiteSetting.vapid_public_key_bytes = Base64.urlsafe_decode64(SiteSetting.vapid_public_key).bytes.join("|")
SiteSetting.vapid_base_url = Discourse.base_url
PushSubscription.delete_all
if ActiveRecord::Base.connection.table_exists?(:push_subscriptions)
PushSubscription.delete_all
end
end
DiscourseEvent.on(:user_logged_out) do |user|