Created
January 20, 2017 07:11
-
-
Save mahardianto/758b6e07356a891f3cbff35c626a2e5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateRegistersTable extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
// | |
Schema::create('registers', function (Blueprint $table) { | |
$table->increments('id'); //int(20) | |
$table->unsignedSmallInteger('tipe_benda'); //int(1) | |
$table->text('nama_benda'); //text | |
$table->text('uraian'); //text | |
$table->string('asal_benda',40); //varchar(40) | |
$table->unsignedSmallInteger('cara_perolehan'); //int(1) | |
$table->date('tanggal_masuk'); //date | |
$table->date('tanggal_benda'); //date | |
$table->unsignedInteger('harga_satuan'); //int(9) | |
$table->unsignedSmallInteger('jumlah'); //int(4) | |
$table->text('keterangan'); //text | |
$table->string('bast',30); //varchar | |
$table->unsignedSmallInteger('id_user'); //int(10) | |
$table->timestamps(); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
// | |
Schema::drop('registers'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment