- Add Business Type In Company

- Seeder CLF Company
- DB Migration 4
This commit is contained in:
CheeSiong
2020-11-24 14:34:41 +08:00
parent 2faad9a7f8
commit 83a9cee82d
6 changed files with 123 additions and 3 deletions
@@ -15,9 +15,10 @@ class CreateCompaniesTable extends Migration
{
Schema::create('companies', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('reference')->nullable();
$table->integer('type')->nullable();
$table->string('name');
$table->string('reference');
$table->integer('type');
$table->integer('business_type')->default(1);
$table->timestamps();
$table->softDeletes();
});
@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCompanyBanksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('company_banks', function (Blueprint $table) {
$table->id();
$table->bigInteger('country_id')->unsigned()->nullable();
$table->foreign('country_id')->references('id')->on('countries')->onDelete('cascade');
$table->bigInteger('company_id')->unsigned()->nullable();
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
$table->string('bank_name');
$table->string('holder_name');
$table->string('account_no');
$table->integer('type');
$table->integer('default');
$table->integer('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('company_banks');
}
}