Update migration script
This commit is contained in:
		
							parent
							
								
									a09613cdd4
								
							
						
					
					
						commit
						ae58046265
					
				
					 1 changed files with 13 additions and 1 deletions
				
			
		| 
						 | 
					@ -1 +1,13 @@
 | 
				
			||||||
db.posts.update({ mediaIds: null }, { $set: { mediaIds: [] } }, false, true);
 | 
					db.posts.update({
 | 
				
			||||||
 | 
						$or: [{
 | 
				
			||||||
 | 
							mediaIds: null
 | 
				
			||||||
 | 
						}, {
 | 
				
			||||||
 | 
							mediaIds: {
 | 
				
			||||||
 | 
								$exist: false
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}]
 | 
				
			||||||
 | 
					}, {
 | 
				
			||||||
 | 
						$set: {
 | 
				
			||||||
 | 
							mediaIds: []
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}, false, true);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue