Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 297 | Revision 475 | 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( '' );
432 lars 22
                $table->unsignedTinyInteger( 'articlemaster' )->default( '0' );
297 lars 23
                $table->unsignedTinyInteger( 'status' )->default( '0' );
24
                $table->string( 'url' )->default( '' );
25
                $table->text( 'description' )->default( '' );
26
                $table->string( 'short_line_1' )->default( '' );
27
                $table->bigInteger( "directory_id" )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
28
                $table->string( 'created_by' )->default( '' );
29
                $table->string( 'updated_by' )->default( '' );
30
                $table->timestamps();
31
            } );
32
        }
2 lars 33
 
297 lars 34
        /**
35
         * Reverse the migrations.
36
         *
37
         * @return void
38
         */
39
        public function down(): void
40
        {
41
            Schema::dropIfExists( 'directories' );
42
        }
43
    };