Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 534 | Revision 536 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 534 Revision 535
Zeile 72... Zeile 72...
72
            $this->migrateShops();
72
            $this->migrateShops();
73
            $this->migrateOrderTypes();
73
            $this->migrateOrderTypes();
74
            $this->migratePaymentMethods();
74
            $this->migratePaymentMethods();
75
            $this->migrateShippingGroups();
75
            $this->migrateShippingGroups();
76
            $this->migrateShippings();
76
            $this->migrateShippings();
77
            $this->migrateSalesPortalTypes();
-
 
78
            //$this->migrateSalesPortals();
-
 
79
            if ( $migrateActions )
77
            if ( $migrateActions )
80
            {
78
            {
81
                $this->migrateActions();
79
                $this->migrateActions();
82
            }
80
            }
83
            if ( $migrateDirs )
81
            if ( $migrateDirs )
Zeile 100... Zeile 98...
100
                $this->migrateUsers();
98
                $this->migrateUsers();
101
                $this->migrateAddresses();
99
                $this->migrateAddresses();
102
                $this->migrateOrderAddresses();
100
                $this->migrateOrderAddresses();
103
                $this->migrateOrders();
101
                $this->migrateOrders();
104
                $this->migrateOrderItems();
102
                $this->migrateOrderItems();
-
 
103
                $this->migrateSalesPortalTypes();
105
            }
104
            }
-
 
105
            //$this->migrateSalesPortals();
106
            $this->info( date( "d.m.Y H:i:s" ) . ": Verarbeitung beendet" );
106
            $this->info( date( "d.m.Y H:i:s" ) . ": Verarbeitung beendet" );
107
        }
107
        }
Zeile 108... Zeile 108...
108
 
108
 
109
        private function migrateShops()
109
        private function migrateShops()
Zeile 325... Zeile 325...
325
                    "created_at"        => $group->erstellt_am,
325
                    "created_at"        => $group->erstellt_am,
326
                ] );
326
                ] );
327
            }
327
            }
328
        }
328
        }
Zeile 329... Zeile -...
329
 
-
 
330
        private function migrateSalesPortalTypes()
-
 
331
        {
-
 
332
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Verkaufsportalarten" );
-
 
333
            $start = 0;
-
 
334
            $sql = "SELECT
-
 
335
                    MAX(id) start
-
 
336
                FROM
-
 
337
                    sales_portal_types
-
 
338
            ";
-
 
339
            $row = DB::connection( 'cms' )->select( $sql );
-
 
340
            if ( $row[0]->start )
-
 
341
            {
-
 
342
                $start = $row[0]->start;
-
 
343
            }
-
 
344
            $sql = "SELECT
-
 
345
                    *
-
 
346
                FROM
-
 
347
                    vportale_art
-
 
348
                WHERE
-
 
349
                    id>" . $start . "
-
 
350
            ";
-
 
351
            $portals = DB::connection( 'cms' )->select( $sql );
-
 
352
            foreach ( $portals as $portal )
-
 
353
            {
-
 
354
                SalesPortalType::factory()->create( [
-
 
355
                    "id"                   => $portal->id,
-
 
356
                    "type"                 => $portal->art,
-
 
357
                    "name"                 => $portal->bezeichnung,
-
 
358
                    "max_categories"       => $portal->max_categories,
-
 
359
                    "min_depth_category"   => $portal->min_depth_category,
-
 
360
                    "only_end_category"    => $portal->only_end_category,
-
 
361
                    "script"               => $portal->skript,
-
 
362
                    "script_folder"        => $portal->script_folder,
-
 
363
                    "commit_possibilities" => $portal->commit_posibilities,
-
 
364
                    "revokeable"           => $portal->stornierbar,
-
 
365
                ] );
-
 
366
            }
-
 
367
        }
-
 
368
 
-
 
369
        private function migrateSalesPortals()
-
 
370
        {
-
 
371
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Verkaufsportale" );
-
 
372
            $start = 0;
-
 
373
            $sql = "SELECT
-
 
374
                    MAX(id) start
-
 
375
                FROM
-
 
376
                    sales_portals
-
 
377
            ";
-
 
378
            $row = DB::connection( 'mysql' )->select( $sql );
-
 
379
            if ( $row[0]->start )
-
 
380
            {
-
 
381
                $start = $row[0]->start;
-
 
382
            }
-
 
383
            $sql = "SELECT
-
 
384
                    *
-
 
385
                FROM
-
 
386
                    vportale
-
 
387
                WHERE
-
 
388
                    id>" . $start . "
-
 
389
            ";
-
 
390
            $portals = DB::connection( 'old' )->select( $sql );
-
 
391
            foreach ( $portals as $portal )
-
 
392
            {
-
 
393
                SalesPortal::factory()->create( [
-
 
394
 
-
 
395
                ] );
-
 
396
            }
-
 
397
        }
-
 
398
 
329
 
399
        private function migrateActions()
330
        private function migrateActions()
400
        {
331
        {
401
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Aktionen" );
332
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Aktionen" );
402
            $start = 0;
333
            $start = 0;
Zeile 1012... Zeile 943...
1012
                $progressbar->advance();
943
                $progressbar->advance();
1013
            }
944
            }
1014
            $progressbar->finish();
945
            $progressbar->finish();
1015
            $progressbar->clear();
946
            $progressbar->clear();
1016
        }
947
        }
-
 
948
 
-
 
949
        private function migrateSalesPortalTypes()
-
 
950
        {
-
 
951
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Verkaufsportalarten" );
-
 
952
            $start = 0;
-
 
953
            $sql = "SELECT
-
 
954
                    MAX(id) start
-
 
955
                FROM
-
 
956
                    sales_portal_types
-
 
957
            ";
-
 
958
            $row = DB::connection( 'cms' )->select( $sql );
-
 
959
            if ( $row[0]->start )
-
 
960
            {
-
 
961
                $start = $row[0]->start;
-
 
962
            }
-
 
963
            $sql = "SELECT
-
 
964
                    *
-
 
965
                FROM
-
 
966
                    vportale_art
-
 
967
                WHERE
-
 
968
                    id>" . $start . "
-
 
969
            ";
-
 
970
            $portals = DB::connection( 'cms' )->select( $sql );
-
 
971
            foreach ( $portals as $portal )
-
 
972
            {
-
 
973
                SalesPortalType::factory()->create( [
-
 
974
                    "id"                   => $portal->id,
-
 
975
                    "type"                 => $portal->art,
-
 
976
                    "name"                 => $portal->bezeichnung,
-
 
977
                    "max_categories"       => $portal->max_categories,
-
 
978
                    "min_depth_category"   => $portal->min_depth_category,
-
 
979
                    "only_end_category"    => $portal->only_end_category,
-
 
980
                    "script"               => $portal->skript,
-
 
981
                    "script_folder"        => $portal->script_folder,
-
 
982
                    "commit_possibilities" => $portal->commit_posibilities,
-
 
983
                    "revokeable"           => $portal->stornierbar,
-
 
984
                ] );
-
 
985
            }
-
 
986
        }
-
 
987
 
-
 
988
        private function migrateSalesPortals()
-
 
989
        {
-
 
990
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Verkaufsportale" );
-
 
991
            $start = 0;
-
 
992
            $sql = "SELECT
-
 
993
                    MAX(id) start
-
 
994
                FROM
-
 
995
                    sales_portals
-
 
996
            ";
-
 
997
            $row = DB::connection( 'mysql' )->select( $sql );
-
 
998
            if ( $row[0]->start )
-
 
999
            {
-
 
1000
                $start = $row[0]->start;
-
 
1001
            }
-
 
1002
            $sql = "SELECT
-
 
1003
                    *
-
 
1004
                FROM
-
 
1005
                    vportale
-
 
1006
                WHERE
-
 
1007
                    id>" . $start . "
-
 
1008
            ";
-
 
1009
            $portals = DB::connection( 'old' )->select( $sql );
-
 
1010
            foreach ( $portals as $portal )
-
 
1011
            {
-
 
1012
                SalesPortal::factory()->create( [
-
 
1013
 
-
 
1014
                ] );
-
 
1015
            }
-
 
1016
        }
1017
    }
1017
    }