This commit is contained in:
iVampireSP.com 2022-09-15 13:28:04 +08:00
parent 3fa05df868
commit 7928fb1efc
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -16,13 +16,15 @@ public function up()
Schema::connection('mongodb')->create('transactions', function (Blueprint $collection) {
$collection->unsignedBigInteger('user_id')->index();
$collection->unsignedBigInteger(
'type'
)->index();
$collection->unsignedBigInteger('payment')->index();
// a year
$year = 365 * 24 * 60 * 60;
$collection->expire('created_at', $year);
});
}
/**