Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateTableEmploye extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('employees', function (Blueprint $table) {
- $table->increments('id');
- $table->string('nama',50);
- $table->string('nip',10);
- $table->string('tgl_lahir',10)->unique();
- $table->enum('gender',['L','P']);
- $table->integer('deleted');
- $table->string('foto',100)->nullable();
- $table->timestamps();//untuk cdate dan mdate otomatis
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('employees');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement