diff --git a/database/migrations/2022_09_14_215159_create_transactions_table.php b/database/migrations/2022_09_14_215159_create_transactions_table.php index 7bdaefe..f4618dd 100644 --- a/database/migrations/2022_09_14_215159_create_transactions_table.php +++ b/database/migrations/2022_09_14_215159_create_transactions_table.php @@ -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); - }); - } /**