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

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 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
         * Run the migrations.
11
         *
12
         * @return void
13
         */
14
        public function up(): void
15
        {
16
            Schema::create( 'media', function ( Blueprint $table )
17
            {
18
                $table->id();
19
                $table->string( "name" )->default( "" );
20
                $table->text( "description" )->default( "" );
21
                $table->foreignId( "medium_type_id" )->nullable()->references( 'id' )->on( 'content_management.medium_types' )->cascadeOnUpdate()->nullOnDelete();
22
                $table->string( "folder" )->default( "" );
23
                $table->string( 'created_by' )->default( '' );
24
                $table->string( 'updated_by' )->default( '' );
25
                $table->timestamps();
26
            } );
27
        }
28
 
29
        /**
30
         * Reverse the migrations.
31
         *
32
         * @return void
33
         */
34
        public function down(): void
35
        {
36
            Schema::dropIfExists( 'media' );
37
        }
38
    };