mirror of
https://github.com/cydrobolt/polr.git
synced 2025-01-13 17:21:09 +01:00
create api quota index
This commit is contained in:
parent
2068eba42b
commit
9e4ad61e2b
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user