38 行
918 B
PHP
38 行
918 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateEmailActivationsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('email_activations', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->unsignedTinyInteger('type');
|
|
$table->unsignedBigInteger('father_id')->nullable();
|
|
$table->string('email', 255)->unique();
|
|
$table->string('token', 64)->unique();
|
|
$table->dateTime('ttl');
|
|
$table->unsignedInteger('relation_limit');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('email_activations');
|
|
}
|
|
}
|