add user migration
This commit is contained in:
parent
50814ffd60
commit
6fbc1fb4f5
5 changed files with 113 additions and 1 deletions
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use App\Database\Migration;
|
||||
use Illuminate\Database\Capsule\Manager as Capsule;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Capsule::schema()->create('users', function ($table) {
|
||||
$table->increments('id');
|
||||
$table->string('email', 255)->unique();
|
||||
$table->string('password_hash', 255);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Capsule::schema()->dropIfExists('users');
|
||||
}
|
||||
}
|
||||
|
||||
return CreateUsersTable::class;
|
||||
Loading…
Add table
Add a link
Reference in a new issue