2019-03-18 08:53:00 -03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2020-07-29 11:58:25 -03:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
2019-03-18 08:53:00 -03:00
|
|
|
|
|
|
|
class CreateUsersTable extends Migration
|
|
|
|
{
|
2020-09-26 07:56:09 -03:00
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2019-03-18 08:53:00 -03:00
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('users', function (Blueprint $table) {
|
|
|
|
$table->increments('id');
|
|
|
|
$table->integer('account_id')->index();
|
|
|
|
$table->string('first_name', 25);
|
|
|
|
$table->string('last_name', 25);
|
|
|
|
$table->string('email', 50)->unique();
|
2021-05-10 16:27:31 -03:00
|
|
|
$table->timestamp('email_verified_at')->nullable();
|
2019-03-18 08:53:00 -03:00
|
|
|
$table->string('password')->nullable();
|
|
|
|
$table->boolean('owner')->default(false);
|
2019-08-09 12:33:47 -03:00
|
|
|
$table->string('photo_path', 100)->nullable();
|
2019-03-18 08:53:00 -03:00
|
|
|
$table->rememberToken();
|
|
|
|
$table->timestamps();
|
|
|
|
$table->softDeletes();
|
|
|
|
});
|
|
|
|
}
|
2020-09-26 07:56:09 -03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('users');
|
|
|
|
}
|
2019-03-18 08:53:00 -03:00
|
|
|
}
|