pixelfed/database/migrations/2019_06_06_032316_create_contacts_table.php

38 lines
917 B
PHP
Raw Normal View History

2019-06-06 04:31:25 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateContactsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contacts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('user_id')->unsigned()->index();
$table->boolean('response_requested')->default(false);
$table->text('message');
$table->text('response');
$table->timestamp('read_at')->nullable();
$table->timestamp('responded_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contacts');
}
}