Skip to content

Commit

Permalink
create api quota index
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Dec 21, 2017
1 parent 2068eba commit 9e4ad61
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions database/migrations/2017_12_21_095425_create_api_quota_index.php
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');
});
}
}

0 comments on commit 9e4ad61

Please sign in to comment.