pixelfed/database/migrations/2019_06_06_032316_create_contacts_table.php
2019-06-05 22:31:25 -06:00

37 lines
917 B
PHP

<?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');
}
}