@@ -1599,7 +1599,7 @@ plugins.setConfigs("crashes", {
1599
1599
1600
1600
plugins . register ( "/i/apps/create" , function ( ob ) {
1601
1601
var appId = ob . appId ;
1602
- common . db . collection ( 'app_crashgroups' + appId ) . insert ( { _id : "meta" } , function ( ) { } ) ;
1602
+ common . db . collection ( 'app_crashgroups' + appId ) . updateOne ( { _id : "meta" } , { $set : { _id : "meta" } } , { upsert : true } , function ( ) { } ) ;
1603
1603
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "name" : 1 } , { background : true } , function ( ) { } ) ;
1604
1604
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "os" : 1 } , { background : true } , function ( ) { } ) ;
1605
1605
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "reports" : 1 } , { background : true } , function ( ) { } ) ;
@@ -1651,7 +1651,7 @@ plugins.setConfigs("crashes", {
1651
1651
common . db . collection ( 'app_crashusers' + appId ) . ensureIndex ( { "uid" : 1 } , { background : true } , function ( ) { } ) ;
1652
1652
} ) ;
1653
1653
common . db . collection ( 'app_crashgroups' + appId ) . drop ( function ( ) {
1654
- common . db . collection ( 'app_crashgroups' + appId ) . insert ( { _id : "meta" } , function ( ) { } ) ;
1654
+ common . db . collection ( 'app_crashgroups' + appId ) . updateOne ( { _id : "meta" } , { $set : { _id : "meta" } } , { upsert : true } , function ( ) { } ) ;
1655
1655
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "name" : 1 } , { background : true } , function ( ) { } ) ;
1656
1656
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "os" : 1 } , { background : true } , function ( ) { } ) ;
1657
1657
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "reports" : 1 } , { background : true } , function ( ) { } ) ;
@@ -1681,7 +1681,7 @@ plugins.setConfigs("crashes", {
1681
1681
common . db . collection ( 'app_crashusers' + appId ) . ensureIndex ( { "uid" : 1 } , { background : true } , function ( ) { } ) ;
1682
1682
} ) ;
1683
1683
common . db . collection ( 'app_crashgroups' + appId ) . drop ( function ( ) {
1684
- common . db . collection ( 'app_crashgroups' + appId ) . insert ( { _id : "meta" } , function ( ) { } ) ;
1684
+ common . db . collection ( 'app_crashgroups' + appId ) . updateOne ( { _id : "meta" } , { $set : { _id : "meta" } } , { upsert : true } , function ( ) { } ) ;
1685
1685
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "name" : 1 } , { background : true } , function ( ) { } ) ;
1686
1686
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "os" : 1 } , { background : true } , function ( ) { } ) ;
1687
1687
common . db . collection ( 'app_crashgroups' + appId ) . ensureIndex ( { "reports" : 1 } , { background : true } , function ( ) { } ) ;
0 commit comments