Implement MakerWorld collections sync every 10 minutes and Artikel Beheer staging workflow

This commit is contained in:
2026-11-01 15:39:10 +01:00
parent 121ff624de
commit 2d78d80934
20 changed files with 1984 additions and 675 deletions
@@ -0,0 +1,41 @@
<?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('makerworld_collections', function (Blueprint $table) {
$table->id();
$table->string('makerworld_collection_id')->unique()->index();
$table->string('name');
$table->string('slug')->nullable();
$table->text('description')->nullable();
$table->string('cover_url', 500)->nullable();
$table->string('user_handle')->nullable()->index();
$table->string('source_url', 500)->nullable();
$table->boolean('is_active_sync')->default(false)->index();
$table->unsignedInteger('sync_interval_minutes')->default(10);
$table->unsignedInteger('items_count')->default(0);
$table->timestamp('last_synced_at')->nullable();
$table->string('last_sync_status')->nullable();
$table->text('last_sync_message')->nullable();
$table->json('raw_metadata')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('makerworld_collections');
}
};
@@ -0,0 +1,46 @@
<?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('products', function (Blueprint $table) {
$table->foreignId('makerworld_collection_id')
->nullable()
->after('makerworld_id')
->constrained('makerworld_collections')
->nullOnDelete();
$table->string('status')
->default('published')
->index()
->after('is_active');
$table->json('print_info')
->nullable()
->after('print_time_hours');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropForeign(['makerworld_collection_id']);
$table->dropColumn([
'makerworld_collection_id',
'status',
'print_info',
]);
});
}
};