database/migrations/2024_05_07_100258_add_fields_column_to_products_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFieldsColumnToProductsTable extends Migration
{
public function up(): void
{
Schema::table('products', function (Blueprint $table) {
$table->json('fields')->nullable();
});
}
public function down(): void
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn('fields');
});
}
}