import moons
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user