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

Revision

Revision 132 | Blame | Vergleich mit vorheriger | 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
        {
            Schema::create( 'suppliers', function ( Blueprint $table )
            {
                $table->id();
                $table->string( 'name' )->default( '' );
                $table->string( 'name2' )->default( '' );
                $table->unsignedInteger( 'rank' )->default( 0 );
                $table->string( 'contact' )->default( '' );
                $table->string( 'street' )->default( '' );
                $table->string( 'houseno' )->default( '' );
                $table->string( 'zip' )->default( '' );
                $table->string( 'city' )->default( '' );
                $table->unsignedSmallInteger( "country_id" )->nullable()->references( 'id' )->on( 'content_management.countries' )->cascadeOnUpdate()->nullOnDelete();
                $table->string( 'phone' )->default( '' );
                $table->string( 'fax' )->default( '' );
                $table->string( 'email' )->default( '' );
                $table->string( 'customer_no' )->default( '' );
                $table->text( 'shipping_hint' )->default( '' );
                $table->text( 'payment_hint' )->default( '' );
                $table->text( 'comment' )->default( '' );
                $table->text( 'commission_text' )->default( '' );
                $table->string( 'skript' )->default( '' );
                $table->string( 'stock_skript' )->default( '' );
                $table->string( 'interval' )->default( '' );
                $table->string( 'accounts_payable' )->default( '' );
                $table->string( 'ledger_account' )->default( '' );
                $table->timestamps();
            } );
        }

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