Updates to 03-2025

This commit is contained in:
Kevin Adametz 2025-04-01 10:39:21 +02:00
parent 6167273a48
commit 9b54eb0512
348 changed files with 34535 additions and 5774 deletions

View file

@ -24,7 +24,11 @@ class CreateCountriesTable extends Migration
$table->string('it', 100);
$table->string('ru', 100);
$table->boolean('active')->default(true);
$table->boolean('supply_country')->default(false);
$table->boolean('eu_country')->default(false);
$table->boolean('switch')->default(false);
$table->boolean('translate')->default(false);
$table->boolean('own_eur')->default(false);
$table->boolean('currency')->default(false);
$table->string('currency_unit', 10)->nullable();

View file

@ -43,6 +43,10 @@ class CreateUserAccountsTable extends Migration
$table->string('tax_identification_number', 20)->nullable();
$table->unsignedTinyInteger('taxable_sales')->nullable();
$table->boolean('reverse_charge')->default(false);
$table->char('reverse_charge_code', 2)->nullable();
$table->timestamp('reverse_charge_valid')->nullable();
$table->boolean('same_as_billing')->default(true);
$table->char('shipping_salutation', 2)->nullable();

View file

@ -15,12 +15,13 @@ class CreateAttributesTable extends Migration
{
Schema::create('attributes', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('attribute_type_id');
$table->unsignedInteger('parent_id')->index()->nullable();
$table->string('name')->index();
$table->text('trans_name')->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('active')->default(false);
$table->boolean('active')->default(true);
$table->string('slug')->unique()->index();
@ -30,6 +31,10 @@ class CreateAttributesTable extends Migration
$table->foreign('parent_id')
->references('id')
->on('attributes');
$table->foreign('attribute_type_id')
->references('id')
->on('attribute_types');
});
}

View file

@ -19,6 +19,9 @@ class CreateProductsTable extends Migration
$table->string('name')->index();
$table->text('trans_name')->nullable();
$table->boolean('whitelabel')->default(false);
$table->text('whitelabel_name')->nullable();
$table->string('title')->nullable()->index();
$table->text('trans_title')->nullable();
@ -71,6 +74,7 @@ class CreateProductsTable extends Migration
$table->decimal('value_commission', 5, 2)->nullable();
$table->decimal('partner_commission', 5, 2)->nullable();
$table->boolean('exclude_stats_sales')->default(false);
$table->string('identifier', 20)->nullable();
$table->boolean('shipping_addon')->default(false);

View file

@ -17,19 +17,26 @@ class CreateProductAttributesTable extends Migration
$table->increments('id');
$table->unsignedInteger('product_id')->index();
$table->unsignedInteger('type_id')->index();
$table->unsignedInteger('attribute_id')->index();
$table->timestamps();
$table->foreign('product_id')
->references('id')
->on('products');
->on('products')
->onDelete('cascade');
$table->foreign('attribute_id')
->references('id')
->on('attributes')
->onDelete('cascade');
$table->foreign('type_id')
->references('id')
->on('attribute_types')
->onDelete('cascade');
});
}

View file

@ -17,23 +17,30 @@ class CreateProductImagesTable extends Migration
$table->increments('id');
$table->unsignedInteger('product_id')->nullable()->index();
$table->unsignedInteger('user_wl_product_id')->nullable()->index();
$table->string('filename')->index();
$table->string('original_name')->index();
$table->string('type', 100)->nullable();
$table->string('ext')->index();
$table->string('mine')->index();
$table->unsignedInteger('size');
$table->boolean('active')->default(true);
$table->string('slug')->unique()->index();
$table->unsignedTinyInteger('pos')->nullable()->default(0);
$table->text('attributes')->nullable();
$table->timestamps();
$table->foreign('product_id')
->references('id')
->on('products')
->onDelete('cascade');
$table->foreign('user_wl_product_id')
->references('id')
->on('user_whitelabel_products')
->onDelete('cascade');
});
}

View file

@ -19,6 +19,9 @@ class CreateShoppingOrdersTable extends Migration
$table->unsignedInteger('shopping_user_id');
$table->unsignedInteger('auth_user_id');
$table->unsignedInteger('promotion_user_id')->nullable();
$table->unsignedInteger('user_shop_id')->nullable();
$table->unsignedInteger('country_id');
$table->unsignedInteger('member_id')->nullable();
@ -45,9 +48,11 @@ class CreateShoppingOrdersTable extends Migration
$table->unsignedInteger('weight')->nullable();
$table->boolean('paid')->default(false);
$table->text('invoice')->nullable();
$table->string('invoice_number', 255)->nullable();
$table->text('invoice')->nullable();
$table->text('delivery')->nullable();
$table->string('wp_invoice_path', 255)->nullable();
$table->text('wp_notice')->nullable();

View file

@ -32,6 +32,9 @@ class CreateShoppingOrderMarginsTable extends Migration
$table->boolean('cancellation')->default(false);
$table->unsignedTinyInteger('status')->index()->default(0);
$table->timestamp('margin_pending_to')->nullable();
$table->boolean('margin_paid')->default(false);
$table->timestamp('partner_commission_pending_to')->nullable();
$table->boolean('partner_commission_paid')->default(false);
$table->unsignedBigInteger('user_credit_id')->nullable();

View file

@ -0,0 +1,55 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserShopsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_shops', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->string('url', 255)->nullable();
$table->string('name', 255)->nullable();
$table->text('description')->nullable();
$table->text('about_you')->nullable();
$table->text('user_address')->nullable();
$table->text('trans')->nullable();
$table->boolean('pick_up')->default(true);
$table->boolean('active')->default(false);
$table->timestamp('active_date')->nullable();
$table->string('featured')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('user_id')
->references('id')
->on('users')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_shops');
}
}

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserRegistersTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('user_registers', function (Blueprint $table) {
$table->string('identifier');
$table->string('instance');
$table->longText('content');
$table->nullableTimestamps();
$table->primary(['identifier', 'instance']);
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::drop('user_registers');
}
}

View file

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLeadTypeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lead_type', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->index();
$table->boolean('active')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lead_type');
}
}

View file

@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAttributeTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('attribute_types', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('parent_id')->index()->nullable();
$table->string('name')->index();
$table->string('description')->nullable();
$table->text('trans_name')->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('active')->default(true);
$table->string('slug')->unique()->index();
$table->timestamps();
$table->foreign('parent_id')
->references('id')
->on('attributes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('attribute_types');
}
}

View file

@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserWhitelabelProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_whitelabel_products', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->unsignedInteger('product_id')->index();
$table->string('info')->nullable();
$table->text('attributes')->nullable();
$table->text('options')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('user_id')
->references('id')
->on('users')
->onDelete('cascade');
$table->foreign('product_id')
->references('id')
->on('products')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_whitelabel_products');
}
}