Files
mtdb_movie/database/migrations/2013_12_07_120703_create_throttle.php
maher 703f50a09d
Some checks failed
Build / run (push) Has been cancelled
first commit
2025-10-29 11:42:25 +01:00

45 lines
993 B
PHP
Executable File

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateThrottle extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('throttle', function(Blueprint $table)
{
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->string('ip_address')->nullable();
$table->integer('attempts')->default(0);
$table->boolean('suspended')->default(0);
$table->boolean('banned')->default(0);
$table->timestamp('last_attempt_at')->nullable();
$table->timestamp('suspended_at')->nullable();
$table->timestamp('banned_at')->nullable();
$table->index('user_id');
$table->collation = config('database.connections.mysql.collation');
$table->charset = config('database.connections.mysql.charset');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('throttle');
}
}