Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 398 | Revision 513 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
398 lars 1
<?php
2
 
476 lars 3
    use Illuminate\Database\Migrations\Migration;
4
    use Illuminate\Database\Schema\Blueprint;
5
    use Illuminate\Support\Facades\Schema;
398 lars 6
 
476 lars 7
    return new class extends Migration
398 lars 8
    {
476 lars 9
        /**
10
         * Run the migrations.
11
         *
12
         * @return void
13
         */
14
        public function up()
15
        {
16
            if ( !Schema::hasTable( 'shippings' ) )
17
            {
18
                Schema::create( 'shippings', function ( Blueprint $table )
19
                {
20
                    $table->id();
21
                    $table->timestamps();
22
                } );
23
            }
24
        }
398 lars 25
 
476 lars 26
        /**
27
         * Reverse the migrations.
28
         *
29
         * @return void
30
         */
31
        public function down()
32
        {
33
            Schema::dropIfExists( 'shippings' );
34
        }
35
    };