Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 594 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 594 Revision 595
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
3
use Illuminate\Database\Migrations\Migration;
3
    use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
4
    use Illuminate\Database\Schema\Blueprint;
Zeile 5... Zeile 5...
5
use Illuminate\Support\Facades\Schema;
5
    use Illuminate\Support\Facades\Schema;
6
 
-
 
7
return new class extends Migration
-
 
8
{
-
 
9
    /**
-
 
10
     * Run the migrations.
-
 
11
     *
-
 
12
     * @return void
-
 
13
     */
6
 
-
 
7
    return new class extends Migration
-
 
8
    {
-
 
9
        /**
-
 
10
         * Run the migrations.
-
 
11
         *
-
 
12
         * @return void
-
 
13
         */
14
    public function up()
14
        public function up(): void
-
 
15
        {
15
    {
16
            Schema::create( 'templates', function ( Blueprint $table )
-
 
17
            {
-
 
18
                $table->id();
-
 
19
                $table->foreignId( 'shop_id' )->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
-
 
20
                $table->string( 'name' )->default( '' );
-
 
21
                $table->text( "description" )->default( '' );
-
 
22
                $table->string( 'template_key' )->default( '' );
-
 
23
                $table->text( 'template_value' )->default( '' );
-
 
24
                $table->enum( 'type', [ '', 'action', 'item', 'directory', 'articlemaster' ] )->default( '' );
16
        Schema::create('templates', function (Blueprint $table) {
25
                $table->string( 'created_by' )->default( '' );
17
            $table->id();
26
                $table->string( 'updated_by' )->default( '' );
18
            $table->timestamps();
27
                $table->timestamps();
Zeile 19... Zeile 28...
19
        });
28
            } );
20
    }
29
        }
21
 
30
 
22
    /**
31
        /**
23
     * Reverse the migrations.
32
         * Reverse the migrations.
24
     *
33
         *
25
     * @return void
34
         * @return void
26
     */
35
         */
27
    public function down()
36
        public function down(): void
28
    {
37
        {