parent
946ec4e2ae
commit
24cabcf313
@ -0,0 +1,12 @@ |
||||
RocketChat.Migrations.add({ |
||||
version: 90, |
||||
up() { |
||||
RocketChat.models.Settings.remove({ _id: 'Piwik', type: 'group' }); |
||||
|
||||
const settings = RocketChat.models.Settings.find({$or: [{_id: 'PiwikAnalytics_url', value: {$ne: null}}, {_id: 'PiwikAnalytics_siteId', value: {$ne: null}}]}).fetch(); |
||||
|
||||
if (settings && settings.length === 2) { |
||||
RocketChat.models.Settings.upsert({_id: 'PiwikAnalytics_enabled'}, {$set: {value: true}}); |
||||
} |
||||
} |
||||
}); |
||||
Loading…
Reference in new issue