Create CI testing
This commit is contained in:
42
database/migrations/2021_06_14_114942_add_admin_to_users.php
Normal file
42
database/migrations/2021_06_14_114942_add_admin_to_users.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddAdminToUsers extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->boolean('admin')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('domain_user', function (Blueprint $table) {
|
||||
$table->integer('domain_id');
|
||||
$table->foreign('domain_id')->references('id')->on('domains');
|
||||
|
||||
$table->integer('user_id');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('admin');
|
||||
});
|
||||
|
||||
Schema::dropIfExists('domain_user');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user