tissue/database/migrations/2020_07_19_173931_create_checkin_webhooks_table.php
shibafu 407fd192bd Revert "Revert "Release 20200823.1100""
This reverts commit 1b5f690f4e3f58b38562d29384b571edb7aecdb3.
2020-08-30 13:57:02 +09:00

40 lines
909 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCheckinWebhooksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('checkin_webhooks', function (Blueprint $table) {
$table->string('id', 64);
$table->integer('user_id')->nullable();
$table->string('name');
$table->timestamps();
$table->softDeletes();
$table->primary('id');
$table->index('user_id');
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('checkin_webhooks');
}
}