Attendize/database/migrations/2019_10_30_163805_create_se...

38 lines
953 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sections', function (Blueprint $table) {
$table->increments('id');
$table->string('section_no')->nullable();
$table->string('description')->nullable();
$table->json('seats')->nullable();
$table->string('section_image')->nullable();
$table->unsignedInteger('venue_id');
$table->foreign('venue_id')->references('id')->on('venues')->onDelete('cascade');
// $table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sections');
}
}