All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m38s
- Copy users and roles migrations to central database context - Redirect central domain root to /admin/login - Fix SuperAdminSeeder to include required role_id
39 lines
948 B
PHP
39 lines
948 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('users', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('name');
|
|
$table->string('email')->unique();
|
|
$table->string('password')->nullable();
|
|
$table->boolean('status')->default(0);
|
|
$table->integer('role_id')->unsigned();
|
|
$table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('users');
|
|
}
|
|
};
|