Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 278 | Revision 432 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
<?php
2
 
297 lars 3
    use Illuminate\Database\Migrations\Migration;
4
    use Illuminate\Database\Schema\Blueprint;
5
    use Illuminate\Support\Facades\Schema;
2 lars 6
 
297 lars 7
    return new class extends Migration
2 lars 8
    {
297 lars 9
        /**
10
         * Run the migrations.
11
         *
12
         * @return void
13
         */
14
        public function up(): void
15
        {
16
            Schema::create( 'directories', function ( Blueprint $table )
17
            {
18
                $table->bigInteger( "id" )->autoIncrement();
19
                $table->string( "name" )->default( "" );
20
                $table->string( "slug" )->default( "" );
21
                $table->string( "kennung" )->default( '' );
22
                $table->unsignedTinyInteger( 'status' )->default( '0' );
23
                $table->string( 'url' )->default( '' );
24
                $table->text( 'description' )->default( '' );
25
                $table->string( 'short_line_1' )->default( '' );
26
                $table->bigInteger( "directory_id" )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
27
                $table->string( 'created_by' )->default( '' );
28
                $table->string( 'updated_by' )->default( '' );
29
                $table->timestamps();
30
            } );
31
        }
2 lars 32
 
297 lars 33
        /**
34
         * Reverse the migrations.
35
         *
36
         * @return void
37
         */
38
        public function down(): void
39
        {
40
            Schema::dropIfExists( 'directories' );
41
        }
42
    };