Add mount_server table, fix wrong field type on other many to many tables, add routes for mounting and unmounting mounts on a server, finish server admin mounts page
This commit is contained in:
parent
a0900b8b94
commit
0eb29dac9c
8 changed files with 119 additions and 22 deletions
|
@ -26,14 +26,14 @@ class AddMountsTable extends Migration
|
|||
|
||||
Schema::create('egg_mount', function (Blueprint $table) {
|
||||
$table->integer('egg_id');
|
||||
$table->char('mount_id', 36);
|
||||
$table->integer('mount_id');
|
||||
|
||||
$table->unique(['egg_id', 'mount_id']);
|
||||
});
|
||||
|
||||
Schema::create('mount_node', function (Blueprint $table) {
|
||||
$table->integer('node_id');
|
||||
$table->char('mount_id', 36);
|
||||
$table->integer('mount_id');
|
||||
|
||||
$table->unique(['node_id', 'mount_id']);
|
||||
});
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddMountServerTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('mount_server', function (Blueprint $table) {
|
||||
$table->integer('server_id');
|
||||
$table->integer('mount_id');
|
||||
|
||||
$table->unique(['server_id', 'mount_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('mount_server');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue