Created
February 16, 2017 02:54
-
-
Save yugo412/d0da842cbeaae1ed7e895a70cbc0d569 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\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