move into sonardesk

This commit is contained in:
Mark Gregory
2026-10-12 14:50:13 +01:00
parent 5f0d2ceb72
commit 38b4a7406f
879 changed files with 24021 additions and 1 deletions
@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('products', function (Blueprint $table): void {
$table->id();
$table->string('name');
$table->boolean('is_active')->default(true);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('products');
}
};
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('products', function (Blueprint $table): void {
$table->string('product_type')->default('product')->after('name');
$table->text('description')->nullable()->after('product_type');
$table->decimal('price', 12, 2)->nullable()->after('description');
$table->string('currency', 3)->default('GBP')->after('price');
$table->string('billing_period')->nullable()->after('currency');
$table->json('features')->nullable()->after('billing_period');
$table->string('cta_label')->nullable()->after('features');
$table->string('cta_url')->nullable()->after('cta_label');
$table->boolean('is_featured')->default(false)->after('cta_url');
$table->unsignedInteger('sort_order')->default(0)->after('is_featured');
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table): void {
$table->dropColumn([
'product_type', 'description', 'price', 'currency', 'billing_period',
'features', 'cta_label', 'cta_url', 'is_featured', 'sort_order',
]);
});
}
};