Subversion-Projekte lars-tiefland.zeldi.de_alt

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
45 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( 'item_templates', function ( Blueprint $table )
17
            {
18
                $table->id();
19
                $table->foreignId( 'template_id' )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
20
                $table->foreignId( "item_id" )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
21
                $table->string( 'created_by' )->default( '' );
22
                $table->string( 'updated_by' )->default( '' );
23
                $table->timestamps();
24
            } );
25
        }
26
 
27
        /**
28
         * Reverse the migrations.
29
         *
30
         * @return void
31
         */
32
        public function down(): void
33
        {
34
            Schema::dropIfExists( 'item_templates' );
35
        }
36
    };