Minor DB rework, remove spaces in database/migration files
This commit is contained in:
41
database/migrations/2021_05_03_104554_create_setup.php
Normal file
41
database/migrations/2021_05_03_104554_create_setup.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSetup extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('setups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->integer('opt_md');
|
||||
});
|
||||
|
||||
Schema::create('node_setup', function (Blueprint $table) {
|
||||
$table->integer('node_id');
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
$table->integer('setup_id');
|
||||
$table->foreign('setup_id')->references('id')->on('setups');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('node_setup');
|
||||
Schema::dropIfExists('setups');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user