| Total Complexity | 2 | 
| Total Lines | 33 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 7 | class CreateSermonsTable extends Migration  | 
            ||
| 8 | { | 
            ||
| 9 | /**  | 
            ||
| 10 | * Run the migrations.  | 
            ||
| 11 | *  | 
            ||
| 12 | * @return void  | 
            ||
| 13 | */  | 
            ||
| 14 | public function up()  | 
            ||
| 15 |     { | 
            ||
| 16 |         Schema::create('fg_sermons', function (Blueprint $table) { | 
            ||
| 17 |             $table->string('id', 150)->primary(); | 
            ||
| 18 |             $table->string('ministry_id', 150)->index(); | 
            ||
| 19 |             $table->string('title'); | 
            ||
| 20 |             $table->string('preacher'); | 
            ||
| 21 |             $table->date('date')->default(today()); | 
            ||
| 22 |             $table->json('main_verses'); | 
            ||
| 23 |             $table->json('reference_verses')->nullable(); | 
            ||
| 24 |             $table->longText('sermon'); | 
            ||
| 25 |             $table->string('resource')->nullable(); | 
            ||
| 26 | $table->timestamps();  | 
            ||
| 27 | |||
| 28 |             $table->foreign('ministry_id')->references('id')->on('fg_ministries')->onDelete('cascade'); | 
            ||
| 29 | });  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * Reverse the migrations.  | 
            ||
| 34 | *  | 
            ||
| 35 | * @return void  | 
            ||
| 36 | */  | 
            ||
| 37 | public function down()  | 
            ||
| 40 | }  | 
            ||
| 41 | }  | 
            ||
| 42 |