Installed laravel-permission and laravel-modules
This commit is contained in:
0
Modules/Karyawaf/Database/Migrations/.gitkeep
Normal file
0
Modules/Karyawaf/Database/Migrations/.gitkeep
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateKaryawansTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('karyawans', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('nama', 50);
|
||||
$table->string('posisi', 50);
|
||||
$table->string('tempat_lahir', 20);
|
||||
$table->datetime('tanggal_lahir');
|
||||
$table->datetime('rekrut');
|
||||
$table->boolean('status');
|
||||
$table->unsignedInteger('created_by');
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreign('created_by')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onUpdate('cascade')
|
||||
->onDelete('restrict');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('karyawans');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user