The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/server/startup/migrations/v6.coffee

16 lines
562 B

Meteor.startup ->
Migrations.add
version: 6
up: ->
console.log 'Changin _id of #general channel room from XXX to GENERAL'
room = RocketChat.models.Rooms.findOneByName('general')
if room?._id is not 'GENERAL'
RocketChat.models.Subscriptions.update({'rid':room._id},{'$set':{'rid':'GENERAL'}},{'multi':1})
ChatMessage.update({'rid':room._id},{'$set':{'rid':'GENERAL'}},{'multi':1})
RocketChat.models.Rooms.removeById(room._id)
delete room._id
RocketChat.models.Rooms.upsert({'_id':'GENERAL'},{$set: room})
console.log 'End'