Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 510 Revision 513
Zeile 888... Zeile 888...
888
                    "updated_at"    => $group->geaendert_am,
888
                    "updated_at"    => $group->geaendert_am,
889
                    "created_at"    => $group->erstellt_am,
889
                    "created_at"    => $group->erstellt_am,
890
                ] );
890
                ] );
891
            }
891
            }
892
        }
892
        }
-
 
893
 
-
 
894
        private function migrateShippings()
-
 
895
        {
-
 
896
            $this->info( date( "d.m.Y H:i:s" ) . ": Migriere Versandoptionen" );
-
 
897
            $start = 0;
-
 
898
            $sql = "SELECT
-
 
899
                    MAX(id) AS start
-
 
900
                FROM
-
 
901
                    shippings
-
 
902
            ";
-
 
903
            $row = DB::connection( "mysql" )->select( $sql );
-
 
904
            if ( $row[ 0 ]->start )
-
 
905
            {
-
 
906
                $start = $row[ 0 ]->start;
-
 
907
            }
-
 
908
            $sql = "SELECT
-
 
909
                    *
-
 
910
                FROM
-
 
911
                    versand
-
 
912
                WHERE
-
 
913
                    id>" . $start . "
-
 
914
            ";
-
 
915
            $methods = DB::connection( 'old' )->select( $sql );
-
 
916
            foreach ( $methods as $group )
-
 
917
            {
-
 
918
                ShippingGroup::factory()->create( [
-
 
919
                    "id"                => $group->id,
-
 
920
                    "rank"              => $group->rang,
-
 
921
                    "shipping_group_id" => $group->versandgruppen_id,
-
 
922
                    "name"              => $group->name,
-
 
923
                    "info_shop"         => $group->info_shop,
-
 
924
                    "info_mail"         => $group->info_mail,
-
 
925
                    "info_internal"     => $group->info_intern,
-
 
926
                    "island_shipping"   => $group->inselversand,
-
 
927
                    "additions"         => $group->zusaetze,
-
 
928
                    "status"            => $group->status,
-
 
929
                    "price"             => $group->preis,
-
 
930
                    "calc_weight_from"  => $group->berechnung_kg_von,
-
 
931
                    "calc_weight_to"    => $group->berechnung_kg_bis,
-
 
932
                    "calc_price_from"   => $group->berechnung_preis_von,
-
 
933
                    "calc_price_to"     => $group->berechnung_preis_bis,
-
 
934
                    "conditions"        => $group->bedingungen,
-
 
935
                    "tax_rate"          => $group->steuersatz,
-
 
936
                    "created_by"        => $group->erstellt_von,
-
 
937
                    "updated_by"        => $group->geaendert_von,
-
 
938
                    "updated_at"        => $group->geaendert_am,
-
 
939
                    "created_at"        => $group->erstellt_am,
-
 
940
                ] );
-
 
941
            }
-
 
942
        }
893
    }
943
    }