This commit is contained in:
ericli1018
2025-06-13 12:24:35 +08:00
parent 1caae33c43
commit 6dfe3e0677
74 changed files with 1497 additions and 253 deletions

View File

@ -18,6 +18,7 @@ class CreateEventsTable extends Migration
$table->boolean('is_front_show')->default(true);
$table->dateTime('post_at')->useCurrent();
$table->text('venue')->nullable();
$table->dateTime('event_at')->useCurrent();
$table->text('contact')->nullalbe();
$table->text('seo_title')->nullable();
$table->text('seo_keyword')->nullable();

View File

@ -23,6 +23,7 @@ class CreateHomeCarouselTable extends Migration
$table->text('body');
$table->text('link')->nullable();
$table->string('link_target')->nullable();
$table->text('featured_photos');
$table->text('photos');
$table->timestamps();
});

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateProductProductRelatedPivotTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_product_related', function (Blueprint $table) {
$table->unsignedBigInteger('product_id')->index();
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
$table->unsignedBigInteger('product_related_id')->index();
$table->foreign('product_related_id')->references('id')->on('products')->onDelete('cascade');
$table->primary(['product_id', 'product_related_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('product_product_related');
}
}

View File

@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('phone')->nullable()->after('password');
$table->string('country')->nullable()->after('phone');
$table->string('company')->nullable()->after('country');
$table->string('job_title')->nullable()->after('company');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('phone');
$table->dropColumn('country');
$table->dropColumn('company');
$table->dropColumn('job_title');
});
}
};