Migrate HickLab3D dashboard and add production auto deployment
Deploy HickLab3D Dashboard / Deploy to production (push) Failing after 19s

This commit is contained in:
Hickmeister
2026-10-10 18:51:23 +01:00
parent 8410a50f26
commit 88dd00551f
974 changed files with 14609 additions and 162573 deletions
@@ -0,0 +1,55 @@
<?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
{
if (! Schema::hasTable('users')) {
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('username')->unique();
$table->string('email')->unique();
$table->string('role')->default('user');
$table->boolean('disabled')->default(false);
$table->boolean('alertEmails')->default(false);
$table->string('password');
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullable();
});
}
if (! Schema::hasTable('password_reset_tokens')) {
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
if (! Schema::hasTable('sessions')) {
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Existing installations may have had these tables before Laravel migrations.
}
};
@@ -0,0 +1,35 @@
<?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('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->bigInteger('expiration')->index();
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->bigInteger('expiration')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};
@@ -0,0 +1,59 @@
<?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('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedSmallInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->string('connection');
$table->string('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
$table->index(['connection', 'queue', 'failed_at']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};
@@ -0,0 +1,65 @@
<?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
{
if (! Schema::hasTable('bambuPrinters')) {
Schema::create('bambuPrinters', function (Blueprint $table) {
$table->id();
$table->string('printerName');
$table->ipAddress('printerIp');
$table->text('mqttPassword');
$table->string('serialNumber')->unique();
$table->foreignId('userId')->constrained('users')->cascadeOnDelete();
});
}
if (! Schema::hasTable('printerTelemetry')) {
Schema::create('printerTelemetry', function (Blueprint $table) {
$table->id();
$table->foreignId('printerId')->constrained('bambuPrinters')->cascadeOnDelete();
$table->json('telemetry');
$table->timestamp('recordedAt')->useCurrent()->index();
$table->index(['printerId', 'recordedAt']);
});
}
if (! Schema::hasTable('filamentTracker')) {
Schema::create('filamentTracker', function (Blueprint $table) {
$table->id();
$table->foreignId('userId')->constrained('users')->cascadeOnDelete();
$table->string('filamentName');
$table->text('amazonUrl');
$table->decimal('filamentWeight', 8, 2)->nullable();
$table->string('brand')->nullable();
$table->string('material')->nullable();
$table->string('color')->nullable();
$table->decimal('itemDiameter', 5, 2)->nullable();
});
}
if (! Schema::hasTable('filamentPriceHistory')) {
Schema::create('filamentPriceHistory', function (Blueprint $table) {
$table->id();
$table->foreignId('filamentId')->constrained('filamentTracker')->cascadeOnDelete();
$table->decimal('price', 10, 2);
$table->json('currentDiscount')->nullable();
$table->timestamp('recordedAt')->useCurrent()->index();
$table->index(['filamentId', 'recordedAt']);
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Preserve tables that may have existed before this migration was installed.
}
};
@@ -0,0 +1,32 @@
<?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('etsy_connections', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('shop_id')->unique();
$table->string('shop_name');
$table->text('access_token');
$table->text('refresh_token');
$table->timestamp('expires_at');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('etsy_connections');
}
};