Subversion-Projekte lars-tiefland.laravel_shop

Revision

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

Revision 614 Revision 615
Zeile 110... Zeile 110...
110
            foreach ( $shops as $oldShop )
110
            foreach ( $shops as $oldShop )
111
            {
111
            {
112
                $shop = new Shop();
112
                $shop = new Shop();
113
                $shop->id = $oldShop->ID;
113
                $shop->id = $oldShop->ID;
114
                $shop->name = $oldShop->Name;
114
                $shop->name = $oldShop->Name;
-
 
115
                $shop->short = '';
-
 
116
                if ( isset( $oldShop->short ) && $oldShop->short )
-
 
117
                {
115
                $shop->short = $oldShop->short;
118
                    $shop->short = $oldShop->short;
-
 
119
                }
116
                $shop->re_short = '';
120
                $shop->re_short = '';
117
                if ( isset( $oldShop->re_short ) && $oldShop->re_short )
121
                if ( isset( $oldShop->re_short ) && $oldShop->re_short )
118
                {
122
                {
119
                    $shop->re_short = $oldShop->re_short;
123
                    $shop->re_short = $oldShop->re_short;
120
                }
124
                }
Zeile 169... Zeile 173...
169
                WHERE
173
                WHERE
170
                    id>" . $start . "
174
                    id>" . $start . "
171
            ";
175
            ";
172
            $methods = DB::connection( 'old' )->select( $sql );
176
            $methods = DB::connection( 'old' )->select( $sql );
173
            foreach ( $methods as $method )
177
            foreach ( $methods as $method )
-
 
178
	    {
-
 
179
		$short = '';
-
 
180
                if ( isset( $method->short ) && $method->short )
174
            {
181
                {
-
 
182
                    $short = $method->short;
-
 
183
                }
-
 
184
 
175
                OrderType::factory()->create( [
185
                OrderType::factory()->create( [
176
                    "id"            => $method->id,
186
                    "id"            => $method->id,
177
                    "internal_name" => $method->rufname,
187
                    "internal_name" => $method->rufname,
178
                    "name"          => $method->name,
188
                    "name"          => $method->name,
179
                    "short"         => $method->short,
189
                    "short"         => $short,
180
                ] );
190
                ] );
181
            }
191
            }
182
        }
192
        }
Zeile 183... Zeile 193...
183
 
193
 
Zeile 370... Zeile 380...
370
                    *
380
                    *
371
                FROM
381
                FROM
372
                    directory
382
                    directory
373
                WHERE
383
                WHERE
374
                    id>' . $start . '
384
                    id>' . $start . '
375
                ORDER BY
-
 
376
                    father
-
 
377
            ';
385
            ';
378
            $dirs = DB::connection( 'old' )->select( $sql );
386
            $dirs = DB::connection( 'old' )->select( $sql );
379
            $progressbar = $this->output->createProgressBar( count( $dirs ) );
387
            $progressbar = $this->output->createProgressBar( count( $dirs ) );
380
            $progressbar->start();
388
	    $progressbar->start();
-
 
389
	    DB::statement('SET FOREIGN_KEY_CHECKS=0');
381
            foreach ( $dirs as $row )
390
            foreach ( $dirs as $row )
382
            {
391
            {
383
                $ersteller = $row->erstellt_von;
392
                $ersteller = $row->erstellt_von;
384
                if ( !$ersteller )
393
                if ( !$ersteller )
385
                {
394
                {
Zeile 406... Zeile 415...
406
                $dir->updated_at = $row->letzte_Aenderung_am;
415
                $dir->updated_at = $row->letzte_Aenderung_am;
407
                $dir->save();
416
                $dir->save();
408
                $progressbar->advance();
417
                $progressbar->advance();
409
            }
418
            }
410
            $progressbar->finish();
419
            $progressbar->finish();
411
            $progressbar->clear();
420
	    $progressbar->clear();
-
 
421
	    DB::statement('SET FOREIGN_KEY_CHECKS=1');
412
        }
422
        }
Zeile 413... Zeile 423...
413
 
423
 
414
        private function migrateItems()
424
        private function migrateItems()
415
        {
425
        {