2021-01-01 21:01:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
class OneoffApplicants extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2023-01-15 00:04:00 +00:00
|
|
|
Schema::create('oneoff_applicants', function (Blueprint $table) {
|
2021-01-01 21:01:23 +00:00
|
|
|
$table->id();
|
|
|
|
$table->string('name');
|
|
|
|
$table->string('email');
|
|
|
|
$table->bigInteger('application_id')->unsigned();
|
|
|
|
$table->timestamps();
|
|
|
|
|
|
|
|
$table->foreign('application_id')
|
|
|
|
->references('id')
|
|
|
|
->on('applications')
|
2023-01-15 00:04:00 +00:00
|
|
|
|
2021-01-01 21:01:23 +00:00
|
|
|
->onDelete('cascade')
|
|
|
|
->onUpdate('cascade');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('oneoff_applicants');
|
|
|
|
}
|
|
|
|
}
|