Subversion-Projekte lars-tiefland.webanos.faltradxxs.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
    {
        /**
         * Run the migrations.
         *
         * @return void
         */
        public function up(): void
        {
            if ( !Schema::hasTable( 'directories' ) )
            {
                Schema::create( 'directories', function ( Blueprint $table )
                {
                    $table->bigInteger( "id" )->autoIncrement();
                    $table->foreignId( "directory_id" )->unsigned( false )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
                    $table->string( "name" )->default( "" );
                    $table->string( "slug" )->default( "" );
                    $table->string( "kennung" )->default( '' );
                    $table->unsignedTinyInteger( 'articlemaster' )->default( '0' );
                    $table->unsignedTinyInteger( 'status' )->default( '0' );
                    $table->string( 'url' )->default( '' );
                    $table->text( 'description' )->default( '' );
                    $table->string( 'short_line_1' )->default( '' );
                    $table->string( 'created_by' )->default( '' );
                    $table->string( 'updated_by' )->default( '' );
                    $table->timestamps();
                } );
            }
        }

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