|
|
@@ -38,7 +38,7 @@ return new class extends Migration
|
|
|
$table->boolean('subscribed_balance_update')->default(true);
|
|
|
$table->boolean('subscribed_point_expiration')->default(true);
|
|
|
$table->timestamp('last_checkout')->useCurrent();
|
|
|
-
|
|
|
+
|
|
|
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
|
|
|
});
|
|
|
}
|
|
|
@@ -51,9 +51,9 @@ return new class extends Migration
|
|
|
$table->unsignedInteger('count_date');
|
|
|
$table->unsignedInteger('point');
|
|
|
$table->string('code', 255)->default('');
|
|
|
- $table->dateTime('created')->nullable();
|
|
|
- $table->dateTime('updated')->nullable();
|
|
|
-
|
|
|
+ $table->dateTime('created_at')->nullable();
|
|
|
+ $table->dateTime('updated_at')->nullable();
|
|
|
+
|
|
|
$table->index('customer_id', 'customer_id_index');
|
|
|
});
|
|
|
}
|
|
|
@@ -73,13 +73,13 @@ return new class extends Migration
|
|
|
$table->integer('point_remaining')->default(0);
|
|
|
$table->boolean('check_time')->default(true);
|
|
|
$table->tinyInteger('status')->default(0);
|
|
|
-
|
|
|
+
|
|
|
$table->index('customer_id', 'customer_id_index');
|
|
|
$table->index('transaction_time', 'transaction_time_index');
|
|
|
$table->index(['customer_id', 'status'], 'customer_status_index');
|
|
|
$table->index(['customer_id', 'history_order_id'], 'customer_order_index');
|
|
|
$table->index('expired_time', 'expired_time_index');
|
|
|
-
|
|
|
+
|
|
|
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
|
|
|
});
|
|
|
}
|
|
|
@@ -96,7 +96,7 @@ return new class extends Migration
|
|
|
$table->string('description')->nullable()->comment('描述');
|
|
|
$table->boolean('is_enabled')->default(true)->comment('是否启用');
|
|
|
$table->timestamps();
|
|
|
-
|
|
|
+
|
|
|
$table->index('group', 'idx_group');
|
|
|
$table->index('is_enabled', 'idx_enabled');
|
|
|
});
|