44 lines
1.3 KiB
PHP
44 lines
1.3 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
|
||
|
|
class CreateViharsTable extends Migration
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Run the migrations.
|
||
|
|
*
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function up()
|
||
|
|
{
|
||
|
|
Schema::create('vihars', function (Blueprint $table) {
|
||
|
|
$table->id();
|
||
|
|
$table->foreignId('user_id')->constrained()->nullOnDelete();
|
||
|
|
$table->foreignId('sant_id')->constrained()->cascadeOnDelete();
|
||
|
|
$table->string('from')->nullable();
|
||
|
|
$table->string('to')->nullable();
|
||
|
|
$table->date('start_date')->nullable();
|
||
|
|
$table->date('end_date')->nullable();
|
||
|
|
$table->time('start_time')->nullable();
|
||
|
|
$table->time('end_time')->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();
|
||
|
|
$table->softDeletes();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Reverse the migrations.
|
||
|
|
*
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function down()
|
||
|
|
{
|
||
|
|
Schema::dropIfExists('vihars');
|
||
|
|
}
|
||
|
|
}
|