osb/database/migrations/2017_06_18_104531_create_users_table.php
2018-06-18 21:18:34 +10:00

50 lines
1.1 KiB
PHP

<?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->timestamps();
$table->integer('site_id');
$table->string('email', 191);
$table->string('password', 191)->nullable();
$table->string('remember_token', 100)->nullable();
$table->boolean('active');
$table->string('title', 191)->nullable();
$table->string('firstname', 191);
$table->string('lastname', 191);
$table->integer('country_id');
$table->string('address1', 191)->nullable();
$table->string('address2', 191)->nullable();
$table->string('city', 191)->nullable();
$table->string('state', 191)->nullable();
$table->string('postcode', 191)->nullable();
$table->boolean('emailable')->default(1);
$table->unique(['site_id','email']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}