import moons

This commit is contained in:
2021-05-30 19:26:40 +09:00
parent 76b19c6ff5
commit db557162af
2 changed files with 36 additions and 0 deletions

View File

@@ -46,7 +46,15 @@ class CreateNewMoonRentalTables extends Migration
Schema::create('alliance_moon_ores', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('moon_id');
$table->foreign('moon_id', 'fk_moon_id')
->references('moon_id')
->on('alliance_moons')
->cascadeOnDelete();
$table->string('moon_name');
$table->foreign('moon_name', 'fk_moon_name')
->references('moon_name')
->on('alliance_moons')
->cascadeOnDelete();
$table->unsignedBigInteger('ore_type_id');
$table->string('ore_name');
$table->float('quantity');

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddForeignKeysToExistingMigrations extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}