mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-27 16:34:27 +00:00
remove: employee table migration file.
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateEmployeesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('employees', function (Blueprint $table) {
|
||||
$table->foreignId('company_id')->unsigned();
|
||||
$table->foreignId('user_id')->unsigned();
|
||||
$table->integer('status')->default(ApprovalStatus::APPROVED);
|
||||
|
||||
$table->primary(['company_id', 'user_id']);
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
$table->foreign('company_id')->references('id')->on('companies');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('employees');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user