-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2068eba
commit 9e4ad61
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
database/migrations/2017_12_21_095425_create_api_quota_index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,36 @@ | |||
<?php | |||
|
|||
use Illuminate\Database\Schema\Blueprint; | |||
use Illuminate\Database\Migrations\Migration; | |||
|
|||
class CreateApiQuotaIndex extends Migration | |||
{ | |||
/** | |||
* Run the migrations. | |||
* | |||
* @return void | |||
*/ | |||
public function up() | |||
{ | |||
Schema::table('links', function (Blueprint $table) | |||
{ | |||
$table->index( | |||
['created_at', 'creator', 'is_api'], | |||
'api_quota_index' | |||
); | |||
}); | |||
} | |||
|
|||
/** | |||
* Reverse the migrations. | |||
* | |||
* @return void | |||
*/ | |||
public function down() | |||
{ | |||
Schema::table('links', function (Blueprint $table) | |||
{ | |||
$table->dropIndex('api_quota_index'); | |||
}); | |||
} | |||
} |