30 lines
712 B
PHP
30 lines
712 B
PHP
|
<?php
|
||
|
|
||
|
namespace itguild\forms\form\migrations;
|
||
|
use Illuminate;
|
||
|
|
||
|
class UserMigration
|
||
|
{
|
||
|
|
||
|
public static function up(): void
|
||
|
{
|
||
|
|
||
|
Illuminate\Database\Capsule\Manager::schema()->create("user", function ($table) {
|
||
|
$table->increments('id');
|
||
|
$table->string('name');
|
||
|
$table->string('email')->unique();
|
||
|
$table->string('password');
|
||
|
$table->string('userimage')->nullable();
|
||
|
$table->string('api_key')->nullable()->unique();
|
||
|
$table->rememberToken();
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
public static function down(): void
|
||
|
{
|
||
|
Illuminate\Database\Capsule\Manager::schema()->drop("user");
|
||
|
}
|
||
|
|
||
|
}
|