File: /var/www/ipsremont-demo/database/migrations/2020_12_08_155818_create_email_letters_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEmailLettersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_letters', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->string('subject');
$table->string('name');
$table->string('email');
$table->longText('body')->comment('Письмо')->nullable();
$table->string('event')->comment('Событие');
$table->string('type')->comment('Получатель');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('email_letters');
}
}