Created
March 4, 2015 13:20
-
-
Save ziyahan/112dcfb8d07705136c41 to your computer and use it in GitHub Desktop.
User migrations
This file contains hidden or 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\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateUsersTable extends Migration { | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Schema::create('users', function(Blueprint $table) | |
{ | |
$table->increments('id'); | |
$table->integer('role_id')->references('id')->on('roles'); | |
$table->string('username',255)->unique(); | |
$table->string('email')->unique(); | |
$table->string('password', 60); | |
$table->boolean('isActive')->default(0); | |
$table->boolean('loggedIn')->default(0); | |
$table->rememberToken(); | |
$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