1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-09 11:42:28 +01:00

create api quota index

This commit is contained in:
Iuri de Silvio 2017-12-21 08:44:24 -02:00
parent 2068eba42b
commit 9e4ad61e2b

View File

@ -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');
});
}
}