Skip to content

Instantly share code, notes, and snippets.

@yugo412
Created February 16, 2017 02:54
Show Gist options
  • Save yugo412/d0da842cbeaae1ed7e895a70cbc0d569 to your computer and use it in GitHub Desktop.
Save yugo412/d0da842cbeaae1ed7e895a70cbc0d569 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('name')->index();
$table->string('email')->unique();
$table->string('birthplace', 50)->nullable();
$table->date('birthdate')->nullable();
$table->enum('gender', array('m','f'))->default('m');
$table->string('about', 500);
$table->string('phone', 20);
$table->string('mobile', 20);
$table->boolean('is_active')->default(1);
$table->string('password');
$table->string('remember_token', 100)->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment