1818import { Meteor } from 'meteor/meteor' ;
1919import { check } from 'meteor/check' ;
2020import { ReactiveCache } from '/imports/reactiveCache' ;
21+ import Boards from '/models/boards' ;
22+ import Lists from '/models/lists' ;
23+ import Cards from '/models/cards' ;
2124
2225class FixMissingListsMigration {
2326 constructor ( ) {
@@ -158,7 +161,7 @@ class FixMissingListsMigration {
158161 if ( originalList . collapsed ) newListData . collapsed = originalList . collapsed ;
159162
160163 // Insert the new list
161- const newListId = ReactiveCache . getCollection ( 'lists' ) . insert ( newListData ) ;
164+ const newListId = Lists . insert ( newListData ) ;
162165 targetList = { _id : newListId , ...newListData } ;
163166 createdLists ++ ;
164167
@@ -167,7 +170,7 @@ class FixMissingListsMigration {
167170
168171 // Update all cards in this group to use the correct listId
169172 for ( const card of cardsInList ) {
170- ReactiveCache . getCollection ( 'cards' ) . update ( card . _id , {
173+ Cards . update ( card . _id , {
171174 $set : {
172175 listId : targetList . _id ,
173176 modifiedAt : new Date ( )
@@ -179,7 +182,7 @@ class FixMissingListsMigration {
179182 }
180183
181184 // Mark board as processed
182- ReactiveCache . getCollection ( 'boards' ) . update ( boardId , {
185+ Boards . update ( boardId , {
183186 $set : {
184187 fixMissingListsCompleted : true ,
185188 fixMissingListsCompletedAt : new Date ( )
0 commit comments