| 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( 'sales_portals', function ( Blueprint $table )
|
|
|
17 |
{
|
|
|
18 |
$table->id();
|
|
|
19 |
$table->string( 'name' )->default( '' );
|
|
|
20 |
$table->string( 'template' )->default( '' );
|
|
|
21 |
$table->foreignId('sales_portal_type_id')->nullable()->references('id')->on('content_management.sales_portal_types')->cascadeOnUpdate()->nullOnDelete();
|
|
|
22 |
$table->string( "sku_prefix" )->default( '' );
|
|
|
23 |
$table->unsignedTinyInteger( 'price_number' )->default( '1' );
|
|
|
24 |
$table->unsignedTinyInteger( 'base_price' )->default( '1' );
|
|
|
25 |
$table->float( 'min_price' )->default( '0' );
|
|
|
26 |
$table->float( 'max_price' )->default( '0' );
|
|
|
27 |
$table->unsignedTinyInteger( 'digits' )->default( '2' );
|
|
|
28 |
$table->unsignedTinyInteger( 'standard_amount' )->default( '0' );
|
|
|
29 |
$table->string( 'item_url' )->default( '' );
|
|
|
30 |
$table->string( 'currency', 3 )->default( 'EUR' );
|
|
|
31 |
$table->text( 'shipping_state' )->default( '' );
|
|
|
32 |
$table->string( 'delivery' )->default( 'DE_Paket' );
|
|
|
33 |
$table->float( 'shipping_cost' )->default( '0' );
|
|
|
34 |
$table->unsignedTinyInteger( 'afterbuy' )->default( '0' );
|
|
|
35 |
$table->unsignedTinyInteger( 'salutation' )->default( '1' );
|
|
|
36 |
$table->text( 'commit_fields' )->default( '' );
|
|
|
37 |
$table->string( 'zip' )->default( '' );
|
|
|
38 |
$table->string( 'location' )->default( '' );
|
|
|
39 |
$table->string( 'created_by' )->default( '' );
|
|
|
40 |
$table->string( 'updated_by' )->default( '' );
|
|
|
41 |
$table->timestamps();
|
|
|
42 |
} );
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
/**
|
|
|
46 |
* Reverse the migrations.
|
|
|
47 |
*
|
|
|
48 |
* @return void
|
|
|
49 |
*/
|
|
|
50 |
public function down(): void
|
|
|
51 |
{
|
|
|
52 |
Schema::dropIfExists( 'sales_portals' );
|
|
|
53 |
}
|
|
|
54 |
};
|