Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 474 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
151 lars 1
<?php
2
 
153 lars 3
    use Illuminate\Database\Migrations\Migration;
4
    use Illuminate\Database\Schema\Blueprint;
5
    use Illuminate\Support\Facades\Schema;
151 lars 6
 
153 lars 7
    return new class extends Migration
151 lars 8
    {
153 lars 9
        /**
10
         * Run the migrations.
11
         *
12
         * @return void
13
         */
14
        public function up(): void
15
        {
474 lars 16
            if ( !Schema::hasTable( 'shops' ) )
153 lars 17
            {
474 lars 18
                Schema::create( 'shops', function ( Blueprint $table )
19
                {
20
                    $table->id();
21
                    $table->string( 'name' )->default( '' );
22
                    $table->string( "short", 4 )->default( '' );
23
                    $table->string( "re_short", 4 )->default( '' );
24
                    $table->unsignedTinyInteger( 'preisindex_ek' )->default( '1' );
25
                    $table->string( 'importtool' )->default( '' );
26
                    $table->unsignedTinyInteger( 'ebay' )->default( '0' );
27
                    $table->unsignedTinyInteger( 'klonziel' )->default( '0' );
28
                    $table->string( 'konroot' )->default( '' );
29
                    $table->unsignedTinyInteger( 'home' )->default( '0' );
30
                    $table->unsignedTinyInteger( 'erfassung' )->default( '0' );
31
                    $table->string( 'database' )->default( '' );
32
                    $table->string( 'order_db' )->default( '' );
33
                    $table->string( 'mail_server' )->default( '' );
34
                    $table->string( 'mail_user' )->default( '' );
35
                    $table->string( 'mail_password' )->default( '' );
36
                    $table->string( 'domain' )->default( '' );
37
                    $table->unsignedTinyInteger( 'status' )->default( '0' );
515 lars 38
                    $table->unsignedInteger( 'rank' )->default( '0' );
474 lars 39
                    $table->text( 'such_algo' )->default( '' );
40
                    $table->boolean( "uses_dump" )->default( '1' );
41
                    $table->boolean( "plesk" )->default( '1' );
42
                    $table->string( 'user' )->default( '' );
43
                    $table->string( 'server' )->default( '' );
44
                    $table->string( 'plesk_key' )->default( '' );
45
                    $table->timestamps();
46
                } );
47
            }
153 lars 48
        }
151 lars 49
 
153 lars 50
        /**
51
         * Reverse the migrations.
52
         *
53
         * @return void
54
         */
55
        public function down(): void
56
        {
57
            Schema::dropIfExists( 'shops' );
58
        }
59
    };