44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateCustomersTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('customers', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name');
|
|
$table->string('noic')->unique();
|
|
$table->string('alamat');
|
|
$table->string('main_phone');
|
|
$table->string('alternate_phone')->nullable();
|
|
$table->string('alamat_menyurat');
|
|
$table->integer('poskod');
|
|
$table->string('daerah');
|
|
$table->string('negeri');
|
|
$table->integer('umur');
|
|
$table->string('warganegara');
|
|
$table->string('bangsa');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('customers');
|
|
}
|
|
}
|