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
    {
        /**
         * The database connection that should be used by the migration.
         *
         * @var string
         */
        protected $connection = 'order';

        /**
         * Run the migrations.
         *
         * @return void
         */
        public function up(): void
        {
            if ( !Schema::hasTable( 'users' ) )
            {
                Schema::create( 'users', function ( Blueprint $table )
                {
                    $table->id();
                    $table->string( 'name' )->default( "" );
                    $table->string( 'email' )->index()->default( '' );
                    $table->timestamp( 'email_verified_at' )->nullable();
                    $table->string( 'password' )->default( '' );
                    $table->rememberToken()->nullable( false )->default( '' );#
                    $table->string('created_by')->default('');
                    $table->string('updated_by')->default('');
                    $table->timestamps();
                } );
            }
        }

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