2020-04-29 17:15:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
class CreateVacanciesTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('vacancies', function (Blueprint $table) {
|
|
|
|
$table->id();
|
|
|
|
$table->string('vacancyName');
|
|
|
|
$table->longText('vacancyDescription');
|
|
|
|
$table->string('permissionGroupName');
|
|
|
|
$table->string('discordRoleID');
|
2020-05-13 21:47:51 +00:00
|
|
|
$table->unsignedBigInteger('vacancyFormID');
|
2020-04-29 17:15:54 +00:00
|
|
|
$table->integer('vacancyCount')->default(3);
|
|
|
|
$table->timestamps();
|
2020-05-07 23:24:56 +00:00
|
|
|
|
2020-06-26 23:32:33 +00:00
|
|
|
$table->foreign('vacancyFormID')
|
|
|
|
->references('id')
|
|
|
|
->on('forms');
|
|
|
|
|
2020-04-29 17:15:54 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('vacancies');
|
|
|
|
}
|
|
|
|
}
|