Added laravel/passport, assign ftn addresses to nodes

This commit is contained in:
Deon George
2021-06-20 23:03:20 +10:00
parent 84df9ce811
commit 7cab4e288b
24 changed files with 1163 additions and 176 deletions

View File

@@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UniqueRelations extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('node_setup', function (Blueprint $table) {
$table->unique(['node_id','setup_id']);
});
Schema::table('domain_user', function (Blueprint $table) {
$table->unique(['domain_id','user_id']);
});
Schema::table('node_system', function (Blueprint $table) {
$table->unique(['node_id','system_id']);
});
Schema::table('system_user', function (Blueprint $table) {
$table->unique(['system_id','user_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('node_setup', function (Blueprint $table) {
$table->dropUnique(['node_id','setup_id']);
});
Schema::table('domain_user', function (Blueprint $table) {
$table->dropUnique(['domain_id','user_id']);
});
Schema::table('node_system', function (Blueprint $table) {
$table->dropUnique(['node_id','system_id']);
});
Schema::table('system_user', function (Blueprint $table) {
$table->dropUnique(['system_id','user_id']);
});
}
}