Files
Global-Jain/database/migrations/2022_03_15_101359_create_sanghs_table.php
2025-11-05 10:37:10 +05:30

47 lines
1.5 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSanghsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sanghs', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
$table->string('name')->nullable();
$table->unsignedTinyInteger('dharma_id')->nullable();
$table->unsignedTinyInteger('sampraday_id')->nullable();
$table->string('reg_number')->nullable();
$table->date('reg_date')->nullable();
$table->text('address')->nullable();
$table->string('city')->nullable();
$table->bigInteger('pincode')->nullable();
$table->string('longitude')->nullable()->comment('Sangh\'s longitude');
$table->string('latitude')->nullable()->comment('Sangh\'s latitude');
$table->text('about')->nullable();
$table->string('avatar')->nullable();
$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('sanghs');
}
}