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

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<?php

    use Illuminate\Database\Migrations\Migration;
    use Illuminate\Database\Schema\Blueprint;
    use Illuminate\Support\Facades\Schema;

    return new class extends Migration
    {
        /**
         * Run the migrations.
         *
         * @return void
         */
        public function up(): void
        {
            if ( !Schema::hasTable( 'shippings' ) )
            {
                Schema::create( 'shippings', function ( Blueprint $table )
                {
                    $table->id();
                    $table->unsignedInteger( 'rank' )->default( '0' );
                    $table->foreignId( 'shipping_group_id' )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
                    $table->string( 'name' )->default( '' );
                    $table->text( 'info_shop' )->default( '' );
                    $table->text( 'info_mail' )->default( '' );
                    $table->text( 'info_internal' )->default( '' );
                    $table->unsignedTinyInteger( 'island_shipping' )->default( '0' );
                    $table->text( 'additions' )->default( '' );
                    $table->unsignedInteger( 'status' )->default( '0' );
                    $table->float( 'price' )->default( '0' );
                    $table->float( 'calc_weight_from' )->default( '0' );
                    $table->float( 'calc_weight_to' )->default( '0' );
                    $table->float( 'calc_price_from' )->default( '0' );
                    $table->float( 'calc_price_to' )->default( '0' );
                    $table->unsignedTinyInteger( 'tax_rate' )->default( '98' );
                    $table->string( 'conditions' )->default( '' );
                    $table->string( 'created_by' )->default( '' );
                    $table->string( 'updated_by' )->default( '' );
                    $table->timestamps();
                } );
            }
        }

        /**
         * Reverse the migrations.
         *
         * @return void
         */
        public function down(): void
        {
            Schema::dropIfExists( 'shippings' );
        }
    };