Create the users table

This commit is contained in:
James Brooks
2014-11-24 15:43:24 +00:00
parent 49c74da90e
commit 27b3a128bd

View File

@@ -0,0 +1,41 @@
<?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->string('username', 200)->nullable(false);
$table->string('password')->nullable(false);
$table->rememberToken();
$table->string('email')->nullable()->default(null);
$table->boolean('active')->default(1);
$table->tinyInteger('level')->default(2);
$table->timestamps();
$table->index('remember_token');
$table->index('active');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}