Subversion-Projekte lars-tiefland.webanos.zeldi.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
4 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
         * The database connection that should be used by the migration.
11
         *
12
         * @var string
13
         */
14
        protected $connection = 'order';
15
 
16
        /**
17
         * Run the migrations.
18
         *
19
         * @return void
20
         */
21
        public function up(): void
22
        {
23
            if ( !Schema::hasTable( 'users' ) )
24
            {
25
                Schema::create( 'users', function ( Blueprint $table )
26
                {
27
                    $table->id();
28
                    $table->string( 'name' )->default( "" );
29
                    $table->string( 'email' )->index()->default( '' );
30
                    $table->timestamp( 'email_verified_at' )->nullable();
31
                    $table->string( 'password' )->default( '' );
32
                    $table->rememberToken()->nullable( false )->default( '' );#
33
                    $table->string('created_by')->default('');
34
                    $table->string('updated_by')->default('');
35
                    $table->timestamps();
36
                } );
37
            }
38
        }
39
 
40
        /**
41
         * Reverse the migrations.
42
         *
43
         * @return void
44
         */
45
        public function down(): void
46
        {
47
            Schema::dropIfExists( 'users' );
48
        }
49
    };