File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
server/src/database-backend Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -819,24 +819,23 @@ export default class DatabaseBackendMigrations {
819819 if ( mapIdMigrationCompleted === "1" ) {
820820 console . log ( "DB migration: Generate values for Map.id" ) ;
821821
822- // Copy back readId to id, in case the last ID generation failed (otherwise the ID generation below would crash with duplicate
823- // primary keys).
822+ // Copy back readId to id, in case the last ID generation failed (otherwise we might create duplicate IDs below).
824823 await queryInterface . bulkUpdate ( "Maps" , { id : col ( "readId" ) } , { } ) ;
825824
826825 const maps = await this . backend . maps . MapModel . findAll ( {
827826 attributes : [ "id" ]
828827 } ) ;
829828
830829 // First generate increasing ID numbers as strings in the existing column
831- for ( let i = 0 ; i < maps . length ; i ++ ) {
832- await this . backend . maps . MapModel . update ( {
833- id : `${ i + 1 } ` as any
834- } , {
835- where : {
836- id : maps [ i ] . id
837- }
838- } ) ;
839- }
830+ // for (let i = 0; i < maps.length; i++) {
831+ // await this.backend.maps.MapModel.update({
832+ // id: `${i + 1}` as any
833+ // }, {
834+ // where: {
835+ // id: maps[i].id
836+ // }
837+ // });
838+ // }
840839
841840 await this . backend . meta . setMeta ( "mapIdMigrationCompleted" , "2" ) ;
842841 mapIdMigrationCompleted = "2" ;
You can’t perform that action at this time.
0 commit comments