for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSermonsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::create('fg_sermons', function (Blueprint $table) {
$table->string('id', 150)->primary();
$table->string('ministry_id', 150)->index();
$table->string('title');
$table->string('preacher');
$table->date('date')->default(today());
$table->json('main_verses');
$table->json('reference_verses')->nullable();
$table->longText('sermon');
$table->string('resource')->nullable();
$table->timestamps();
$table->foreign('ministry_id')->references('id')->on('fg_ministries')->onDelete('cascade');
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('fg_sermons');