41 lines
1.2 KiB
PHP
41 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateChaturmasTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('chaturmas', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('sant_id')->constrained()->cascadeOnDelete();
|
|
$table->foreignId('chaturmas_date_id')->constrained()->cascadeOnDelete();
|
|
$table->string('place')->nullable();
|
|
$table->date('start_date')->nullable();
|
|
$table->date('end_date')->nullable();
|
|
$table->year('year')->nullable();
|
|
$table->unsignedTinyInteger('is_approved')->default(0)->comment('0 : Un-verified 1 : Verified');
|
|
$table->bigInteger('created_by')->nullable()->length(20);
|
|
$table->bigInteger('updated_by')->nullable()->length(20);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('chaturmas');
|
|
}
|
|
}
|