CasperSecurity
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateOrganisationUnitsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('organisation_units', function (Blueprint $table) {
$table->id();
$table->foreignId('organisation_id')->constrained('organisations')->cascadeOnDelete()->cascadeOnUpdate();
$table->string('unit_type');
$table->string('unit_code');
$table->string('unit_name');
$table->string('parent_unit')->nullable();
$table->text('address');
$table->string('city');
$table->string('state');
$table->string('country');
$table->bigInteger('pincode');
$table->bigInteger('telephone_no')->nullable();
$table->bigInteger('mobile_no')->nullable();
$table->bigInteger('whatsapp_mobile_no')->nullable();
$table->string('email_id')->nullable();
$table->string('pan_no')->nullable();
$table->string('gst_no')->nullable();
$table->string('cin_no')->nullable();
$table->string('tan_no')->nullable();
$table->string('eic_no')->nullable();
$table->string('pi_no')->nullable();
$table->string('inv_no')->nullable();
$table->string('qtn_no')->nullable();
$table->tinyInteger('status')->default('1');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('organisation_units');
}
}