Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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