23-01-2026
This commit is contained in:
parent
a939cd51ef
commit
a8b395e20d
248 changed files with 29342 additions and 4805 deletions
|
|
@ -14,7 +14,7 @@ class CreateUserBusinessesTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('user_businesses', function (Blueprint $table) {
|
||||
|
||||
|
||||
$table->increments('id');
|
||||
|
||||
$table->unsignedInteger('user_id')->index();
|
||||
|
|
@ -51,6 +51,7 @@ class CreateUserBusinessesTable extends Migration
|
|||
$table->decimal('sales_volume_total_shop', 13, 2)->nullable();
|
||||
$table->decimal('sales_volume_total_sum', 13, 2)->nullable();
|
||||
|
||||
$table->integer('calc_qual_kp')->nullable();
|
||||
$table->integer('payline_points')->nullable();
|
||||
$table->integer('payline_points_qual_kp')->nullable();
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ class CreateUserBusinessesTable extends Migration
|
|||
$table->text('qual_user_level_next')->nullable();
|
||||
$table->text('next_qual_user_level')->nullable();
|
||||
$table->text('next_can_user_level')->nullable();
|
||||
|
||||
|
||||
$table->unsignedTinyInteger('version')->index();
|
||||
|
||||
$table->timestamps();
|
||||
|
|
|
|||
|
|
@ -14,12 +14,13 @@ class CreateUserAboOrdersTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('user_abo_orders', function (Blueprint $table) {
|
||||
|
||||
|
||||
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('user_abo_id');
|
||||
$table->unsignedInteger('shopping_order_id');
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_abo_id')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDashboardNewsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('dashboard_news', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title')->nullable();
|
||||
$table->text('teaser')->nullable();
|
||||
$table->text('content')->nullable();
|
||||
$table->json('trans_title')->nullable();
|
||||
$table->json('trans_teaser')->nullable();
|
||||
$table->json('trans_content')->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('dashboard_news');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddDisplayDateToDashboardNews extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('dashboard_news', function (Blueprint $table) {
|
||||
$table->date('display_date')->nullable()->after('active');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('dashboard_news', function (Blueprint $table) {
|
||||
$table->dropColumn('display_date');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Migration: Points-Spalten von INT auf DECIMAL(10,2) umstellen
|
||||
*
|
||||
* Betroffene Tabellen:
|
||||
* - products: points
|
||||
* - user_sales_volumes: points, month_KP_points, month_TP_points, month_shop_points
|
||||
* - user_businesses: sales_volume_KP_points, sales_volume_TP_points, sales_volume_points_shop,
|
||||
* sales_volume_points_KP_sum, sales_volume_points_TP_sum, payline_points, payline_points_qual_kp
|
||||
* - shopping_orders: points
|
||||
* - shopping_order_items: points
|
||||
*
|
||||
* Grund: Produkte können Dezimal-Punkte haben (z.B. 12.5 Punkte)
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
// 1. Products Tabelle
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->decimal('points', 10, 2)->unsigned()->nullable()->default(0)->change();
|
||||
});
|
||||
|
||||
// 2. User Sales Volumes Tabelle
|
||||
Schema::table('user_sales_volumes', function (Blueprint $table) {
|
||||
$table->decimal('points', 10, 2)->nullable()->change();
|
||||
$table->decimal('month_KP_points', 10, 2)->nullable()->change();
|
||||
$table->decimal('month_TP_points', 10, 2)->nullable()->change();
|
||||
$table->decimal('month_shop_points', 10, 2)->nullable()->change();
|
||||
});
|
||||
|
||||
// 3. User Businesses Tabelle
|
||||
Schema::table('user_businesses', function (Blueprint $table) {
|
||||
$table->decimal('sales_volume_KP_points', 10, 2)->nullable()->change();
|
||||
$table->decimal('sales_volume_TP_points', 10, 2)->nullable()->change();
|
||||
$table->decimal('sales_volume_points_shop', 10, 2)->nullable()->change();
|
||||
$table->decimal('sales_volume_points_KP_sum', 10, 2)->nullable()->change();
|
||||
$table->decimal('sales_volume_points_TP_sum', 10, 2)->nullable()->change();
|
||||
$table->decimal('payline_points', 10, 2)->nullable()->change();
|
||||
$table->decimal('payline_points_qual_kp', 10, 2)->nullable()->change();
|
||||
});
|
||||
|
||||
// 4. Shopping Orders Tabelle
|
||||
Schema::table('shopping_orders', function (Blueprint $table) {
|
||||
$table->decimal('points', 10, 2)->unsigned()->nullable()->change();
|
||||
});
|
||||
|
||||
// 5. Shopping Order Items Tabelle
|
||||
Schema::table('shopping_order_items', function (Blueprint $table) {
|
||||
$table->decimal('points', 10, 2)->unsigned()->nullable()->default(0)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// 1. Products Tabelle zurück auf INT
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->unsignedInteger('points')->nullable()->default(0)->change();
|
||||
});
|
||||
|
||||
// 2. User Sales Volumes Tabelle zurück auf INT
|
||||
Schema::table('user_sales_volumes', function (Blueprint $table) {
|
||||
$table->integer('points')->nullable()->change();
|
||||
$table->integer('month_KP_points')->nullable()->change();
|
||||
$table->integer('month_TP_points')->nullable()->change();
|
||||
$table->integer('month_shop_points')->nullable()->change();
|
||||
});
|
||||
|
||||
// 3. User Businesses Tabelle zurück auf INT
|
||||
Schema::table('user_businesses', function (Blueprint $table) {
|
||||
$table->integer('sales_volume_KP_points')->nullable()->change();
|
||||
$table->integer('sales_volume_TP_points')->nullable()->change();
|
||||
$table->integer('sales_volume_points_shop')->nullable()->change();
|
||||
$table->integer('sales_volume_points_KP_sum')->nullable()->change();
|
||||
$table->integer('sales_volume_points_TP_sum')->nullable()->change();
|
||||
$table->integer('payline_points')->nullable()->change();
|
||||
$table->integer('payline_points_qual_kp')->nullable()->change();
|
||||
});
|
||||
|
||||
// 4. Shopping Orders Tabelle zurück auf INT
|
||||
Schema::table('shopping_orders', function (Blueprint $table) {
|
||||
$table->unsignedInteger('points')->nullable()->change();
|
||||
});
|
||||
|
||||
// 5. Shopping Order Items Tabelle zurück auf INT
|
||||
Schema::table('shopping_order_items', function (Blueprint $table) {
|
||||
$table->unsignedInteger('points')->nullable()->default(0)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('product_bundles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('product_id')->comment('Das Set/Kit (Parent)');
|
||||
$table->unsignedInteger('bundle_product_id')->comment('Enthaltenes Produkt (Child)');
|
||||
$table->unsignedInteger('quantity')->default(1);
|
||||
$table->unsignedInteger('pos')->default(0)->comment('Sortierung');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('product_id')
|
||||
->references('id')
|
||||
->on('products')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign('bundle_product_id')
|
||||
->references('id')
|
||||
->on('products')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unique(['product_id', 'bundle_product_id'], 'unique_bundle');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('product_bundles');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Migration: DHL Postnummer Feld für Packstation-Lieferung
|
||||
*
|
||||
* Das Feld shipping_postnumber speichert die DHL Postnummer des Empfängers.
|
||||
* Diese wird benötigt, wenn an eine Packstation oder Paketbox geliefert wird.
|
||||
*
|
||||
* Format: 6-10 stellige Nummer (z.B. "12345678")
|
||||
* Wenn ausgefüllt: shipping_address enthält "Packstation XXX" oder "Paketbox XXX"
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('shopping_users', function (Blueprint $table) {
|
||||
$table->string('shipping_postnumber', 20)->nullable()->after('shipping_phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('shopping_users', function (Blueprint $table) {
|
||||
$table->dropColumn('shipping_postnumber');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('dhl_package_shipments', function (Blueprint $table) {
|
||||
$table->timestamp('tracking_email_sent_at')->nullable()->after('last_tracked_at');
|
||||
$table->string('tracking_email_type', 20)->nullable()->after('tracking_email_sent_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('dhl_package_shipments', function (Blueprint $table) {
|
||||
$table->dropColumn(['tracking_email_sent_at', 'tracking_email_type']);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Migration: DHL Postnummer Feld für Packstation-Lieferung (User Accounts)
|
||||
*
|
||||
* Das Feld shipping_postnumber speichert die DHL Postnummer des User-Accounts.
|
||||
* Diese wird benötigt, wenn an eine Packstation oder Paketbox geliefert wird.
|
||||
*
|
||||
* Format: 6-10 stellige Nummer (z.B. "12345678")
|
||||
* Wenn ausgefüllt: shipping_address enthält "Packstation XXX" oder "Paketbox XXX"
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('user_accounts', function (Blueprint $table) {
|
||||
$table->string('shipping_postnumber', 20)->nullable()->after('shipping_phone');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('user_accounts', function (Blueprint $table) {
|
||||
$table->dropColumn('shipping_postnumber');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('dashboard_news', function (Blueprint $table) {
|
||||
$table->json('file_links')->nullable()->after('trans_content');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('dashboard_news', function (Blueprint $table) {
|
||||
$table->dropColumn('file_links');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('dhl_package_shipments', function (Blueprint $table) {
|
||||
// Add email field for billing email
|
||||
$table->string('email')->nullable()->after('company');
|
||||
|
||||
// Add postnumber field for DHL Postnummer (Packstation)
|
||||
$table->string('postnumber', 20)->nullable()->after('email');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('dhl_package_shipments', function (Blueprint $table) {
|
||||
$table->dropColumn(['email', 'postnumber']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue