pastethingy/database/migrations/2016_05_28_000118_create_de...

36 lines
711 B
PHP
Raw Permalink Normal View History

2016-05-28 19:05:54 +02:00
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDeletionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('deletions', function (Blueprint $table) {
$table->increments('id');
$table->char('paste_id', 6)->unique();
$table->text('reason');
$table->string('deleted_by');
$table->timestamp('deleted_at');
$table->foreign('paste_id')->references('id')->on('pastes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('deletions');
}
}