<commit_before><?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBenefitersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('binary_lookup', function (Blueprint $table){
            $table->integer('id')->unsigned();
            $table->string('description');
        });

        Schema::create('working_legally_lookup', function(Blueprint $table){
            $table->increments('id');
            $table->string('description');
        });

        Schema::create('benefiters', function (Blueprint $table) {
            $table->increments('id');
            // Insert user that created the benefiter's file.
            $table->string('folder_number')->unique();
            $table->string('name');
            $table->string('lastname');
            $table->string('fathers_name')->nullable();
            $table->string('mothers_name')->nullable();
            $table->date('birth_date')->nullable();
            $table->date('arrival_date')->nullable();
            $table->string('address')->nullable();
            $table->string('telephone')->nullable();
            $table->integer('number_of_children')->unsigned()->nullable();
            $table->text('children_names')->nullable();
            $table->text('relatives_residence')->nullable();
//            $table->text('other_language')->nullable();
            $table->boolean('language_interpreter_needed')->nullable();
            $table->boolean('is_benefiter_working')->nullable();
//            $table->string('legal_status_details')->nullable();
            $table->boolean('working_legally')->nullable();
            $table->text('country_abandon_reason')->nullable();
            $table->text('travel_route')->nullable();
            $table->text('travel_duration')->nullable();
            $table->text('detention_duration')->nullable();
//            $table->boolean('has_educational_reference');
//            $table->text('educational_reference_actions');
//            $table->date('educational_reference_date');
            $table->string('origin_country')->nullable();
            $table->string('nationality_country')->nullable();
            $table->string('ethnic_group')->nullable();
            // Insert user that created the benefiter's file.
            $table->integer('document_manager_id');
            $table->text('social_history')->nullable();
            $table->timestamps();

            // Foreign keys
            $table->integer('gender_id')->unsigned()->nullable();
            $table->foreign('gender_id')->references('id')->on('genders_lookup');
            $table->integer('marital_status_id')->unsigned()->nullable();
            $table->foreign('marital_status_id')->references('id')->on('marital_status_lookup');
            $table->integer('education_id')->unsigned()->nullable();
            $table->foreign('education_id')->references('id')->on('education_lookup');
            // Lookup table for work field.
            $table->integer('work_title_id')->unsigned()->nullable();
            $table->foreign('work_title_id')->references('id')->on('work_title_list_lookup');
            $table->softDeletes();<commit_msg>BEN-456 added education specialization field in benefiters DB table<commit_after><?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBenefitersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('binary_lookup', function (Blueprint $table){
            $table->integer('id')->unsigned();
            $table->string('description');
        });

        Schema::create('working_legally_lookup', function(Blueprint $table){
            $table->increments('id');
            $table->string('description');
        });

        Schema::create('benefiters', function (Blueprint $table) {
            $table->increments('id');
            // Insert user that created the benefiter's file.
            $table->string('folder_number')->unique();
            $table->string('name');
            $table->string('lastname');
            $table->string('fathers_name')->nullable();
            $table->string('mothers_name')->nullable();
            $table->date('birth_date')->nullable();
            $table->date('arrival_date')->nullable();
            $table->string('address')->nullable();
            $table->string('telephone')->nullable();
            $table->integer('number_of_children')->unsigned()->nullable();
            $table->text('children_names')->nullable();
            $table->text('relatives_residence')->nullable();
//            $table->text('other_language')->nullable();
            $table->boolean('language_interpreter_needed')->nullable();
            $table->boolean('is_benefiter_working')->nullable();
//            $table->string('legal_status_details')->nullable();
            $table->boolean('working_legally')->nullable();
            $table->text('country_abandon_reason')->nullable();
            $table->text('travel_route')->nullable();
            $table->text('travel_duration')->nullable();
            $table->text('detention_duration')->nullable();
//            $table->boolean('has_educational_reference');
//            $table->text('educational_reference_actions');
//            $table->date('educational_reference_date');
            $table->string('origin_country')->nullable();
            $table->string('nationality_country')->nullable();
            $table->string('ethnic_group')->nullable();
            $table->string('education_specialization')->nullable();
            // Insert user that created the benefiter's file.
            $table->integer('document_manager_id');
            $table->text('social_history')->nullable();
            $table->timestamps();

            // Foreign keys
            $table->integer('gender_id')->unsigned()->nullable();
            $table->foreign('gender_id')->references('id')->on('genders_lookup');
            $table->integer('marital_status_id')->unsigned()->nullable();
            $table->foreign('marital_status_id')->references('id')->on('marital_status_lookup');
            $table->integer('education_id')->unsigned()->nullable();
            $table->foreign('education_id')->references('id')->on('education_lookup');
            // Lookup table for work field.
            $table->integer('work_title_id')->unsigned()->nullable();
            $table->foreign('work_title_id')->references('id')->on('work_title_list_lookup');
            $table->softDeletes();
{'fraction_non_alphanumeric': 0.18522388059701492, 'fraction_numerical': 0.00044776119402985075, 'mean_word_length': 2.7794698251551044, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 175, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6960673', 'n_tokens_mistral': 1701, 'n_tokens_neox': 1717, 'n_words': 194}