53 lines
1.8 KiB
PHP
53 lines
1.8 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateSantsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('sants', function (Blueprint $table) {
|
|
$table->id()->index();
|
|
$table->foreignId('user_id')->constrained()->nullOnDelete();
|
|
$table->string('name')->nullable();
|
|
$table->string('father_name')->nullable();
|
|
$table->string('mother_name')->nullable();
|
|
$table->string('guru_name')->nullable();
|
|
$table->tinyInteger('gender')->nullable()->comment('1: Male, 2: Female');
|
|
$table->string('avatar')->nullable();
|
|
$table->json('honor')->nullable();
|
|
$table->string('qualification')->nullable();
|
|
$table->unsignedTinyInteger('dharma_id')->nullable();
|
|
$table->bigInteger('sampraday_id')->nullable()->length(20);
|
|
$table->bigInteger('guru_id')->nullable()->default(0)->length(20);
|
|
$table->date('birth_date')->nullable();
|
|
$table->date('diksha_date')->nullable();
|
|
$table->string('diksha_place')->nullable();
|
|
$table->text('about')->nullable();
|
|
$table->unsignedTinyInteger('status')->default(1)->comment('1 : Inactive 2 : Active');
|
|
$table->datetime('profile_verified_at')->nullable();
|
|
$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('sants');
|
|
}
|
|
}
|