增加数据库表的comment
This commit is contained in:
parent
30b7f7e33f
commit
1b4c5bf027
|
|
@ -14,6 +14,7 @@ return new class extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('product_relations', function (Blueprint $table) {
|
||||
$table->comment('相关商品表');
|
||||
$table->id();
|
||||
$table->unsignedInteger('product_id')->comment('商品 ID')->index('product_id');
|
||||
$table->unsignedInteger('relation_id')->comment('关联商品 ID')->index('relation_id');
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ return new class extends Migration
|
|||
}
|
||||
|
||||
Schema::table('carts', function (Blueprint $table) {
|
||||
$table->string('session_id')->default('')->after('customer_id');
|
||||
$table->json('guest_shipping_address')->nullable()->after('shipping_address_id');
|
||||
$table->json('guest_payment_address')->nullable()->after('payment_address_id');
|
||||
$table->string('session_id')->comment('当前用户会话 ID')->default('')->after('customer_id');
|
||||
$table->json('guest_shipping_address')->comment('游客配送地址')->nullable()->after('shipping_address_id');
|
||||
$table->json('guest_payment_address')->comment('游客发票地址')->nullable()->after('payment_address_id');
|
||||
});
|
||||
Schema::table('cart_products', function (Blueprint $table) {
|
||||
$table->string('session_id')->default('')->after('customer_id');
|
||||
$table->string('session_id')->comment('当前用户会话 ID')->default('')->after('customer_id');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ return new class extends Migration
|
|||
}
|
||||
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->integer('sales')->default(0)->after('tax_class_id');
|
||||
$table->integer('sales')->comment('销量')->default(0)->after('tax_class_id');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue