e29a5891c8
Reviewed-on: #5 Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com> Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
70 lines
2.4 KiB
PHP
70 lines
2.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateUsersTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('users', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name');
|
|
$table->string('username')->unique();
|
|
$table->string('kodcaw')->nullable();
|
|
$table->string('nokp')->nullable();
|
|
$table->string('bank_acc_pembeli')->nullable();
|
|
$table->string('bank_acc_no_pembeli')->nullable();
|
|
$table->string('alamat')->nullable();
|
|
$table->string('notelpejabat')->nullable();
|
|
$table->string('notelbimbit')->nullable();
|
|
$table->string('note')->nullable(); // operasi
|
|
$table->string('status')->nullable(); // set
|
|
$table->datetime('t_daftar')->nullable();
|
|
$table->integer('online')->nullable(); // set
|
|
$table->integer('register_agree')->nullable();
|
|
$table->string('email')->unique();
|
|
$table->string('token')->nullable();
|
|
$table->tinyInteger('is_verified')->default(0);
|
|
$table->datetime('email_verified_at')->nullable();
|
|
$table->string('password');
|
|
$table->datetime('disahkan_pada')->nullable();
|
|
$table->integer('disahkan_oleh')->nullable();
|
|
$table->string('user_type')->nullable(); // set 1,2
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
});
|
|
|
|
Schema::create('loguser', function (Blueprint $table) {
|
|
$table->bigIncrements('recno');
|
|
$table->integer('user_id')->nullable(); // set
|
|
$table->datetime('date')->nullable();
|
|
$table->string('username')->nullable();
|
|
$table->string('nama_user')->nullable();
|
|
$table->string('norujukan')->nullable();
|
|
$table->string('nota');
|
|
$table->timestamps();
|
|
|
|
// $table->foreign('norujukan')
|
|
// ->references('norujukan')->on('gadai')
|
|
// ->onDelete('cascade');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('users');
|
|
}
|
|
}
|