<commit_before><?php

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

class VisitingTransferInitialSetup extends Migration
{

    public function up()
    {
        //
        Schema::create('vt_application', function (Blueprint $table) {
            $table->increments('id');
            $table->smallInteger("type")->default(\App\Modules\Visittransfer\Models\Application::TYPE_VISIT);
            $table->integer('account_id')->unsigned();
            $table->integer('facility_id')->unsigned()->nullable();
            $table->text('statement')->nullable();
//            $table->boolean('approved')->nullable();
//            $table->integer('reason_id')->unsigned()->nullable();
//            $table->integer('reviewed_by')->unsigned()->nullable();
//            $table->timestamp('reapplication_date')->nullable();
            $table->smallInteger("status")->default(\App\Modules\Visittransfer\Models\Application::STATUS_IN_PROGRESS);
            $table->timestamp("submitted_at")->nullable();
            $table->timestamps();
        });

        Schema::create('vt_referee', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('application_id')->unsigned();
            $table->integer('account_id')->unsigned();
            $table->string("email", 85)->nullable();
            $table->string("relationship", 85)->nullable();
            $table->text('reference')->nullable();
            $table->smallInteger("status")->default(\App\Modules\Visittransfer\Models\Referee::STATUS_DRAFT);
            $table->timestamp("submitted_at")->nullable();
        });

        Schema::create('vt_facility', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 30);
            $table->string("description", 500);
            $table->boolean("training_required")->default(0);
            $table->mediumInteger('training_spaces')->unsigned()->default(0);
            $table->boolean("stage_statement_enabled")->default(1);
            $table->boolean("stage_reference_enabled")->default(1);
            $table->smallInteger("stage_reference_quantity")->default(1);
            $table->boolean("stage_checks")->default(1);
            $table->boolean("auto_acceptance")->default(0);
        });
        
        //--POSSIBLY NOT NEEDED BELOW HERE //
//
//        Schema::create('vt_stage', function (Blueprint $table) {
//            $table->mediumIncrements('id');
//            $table->string('key', 50)->unique();
//            $table->string('name', 50);
//            $table->text('description');<commit_msg>Added SoftDeletes to the VT models that require it.<commit_after><?php

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

class VisitingTransferInitialSetup extends Migration
{

    public function up()
    {
        //
        Schema::create('vt_application', function (Blueprint $table) {
            $table->increments('id');
            $table->smallInteger("type")->default(\App\Modules\Visittransfer\Models\Application::TYPE_VISIT);
            $table->integer('account_id')->unsigned();
            $table->integer('facility_id')->unsigned()->nullable();
            $table->text('statement')->nullable();
//            $table->boolean('approved')->nullable();
//            $table->integer('reason_id')->unsigned()->nullable();
//            $table->integer('reviewed_by')->unsigned()->nullable();
//            $table->timestamp('reapplication_date')->nullable();
            $table->smallInteger("status")->default(\App\Modules\Visittransfer\Models\Application::STATUS_IN_PROGRESS);
            $table->timestamp("submitted_at")->nullable();
            $table->timestamps();
            $table->softDeletes();
        });

        Schema::create('vt_referee', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('application_id')->unsigned();
            $table->integer('account_id')->unsigned();
            $table->string("email", 85)->nullable();
            $table->string("relationship", 85)->nullable();
            $table->text('reference')->nullable();
            $table->smallInteger("status")->default(\App\Modules\Visittransfer\Models\Referee::STATUS_DRAFT);
            $table->timestamp("submitted_at")->nullable();
            $table->softDeletes();
        });

        Schema::create('vt_facility', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 30);
            $table->string("description", 500);
            $table->boolean("training_required")->default(0);
            $table->mediumInteger('training_spaces')->unsigned()->default(0);
            $table->boolean("stage_statement_enabled")->default(1);
            $table->boolean("stage_reference_enabled")->default(1);
            $table->smallInteger("stage_reference_quantity")->default(1);
            $table->boolean("stage_checks")->default(1);
            $table->boolean("auto_acceptance")->default(0);
            $table->softDeletes();
        });
        
        //--POSSIBLY NOT NEEDED BELOW HERE //
//
//        Schema::create('vt_stage', function (Blueprint $table) {
//            $table->mediumIncrements('id');
//            $table->string('key', 50)->unique();
//            $table->string('name', 50);
//            $table->text('description');
{'fraction_non_alphanumeric': 0.19020438225004604, 'fraction_numerical': 0.0073651261277849385, 'mean_word_length': 2.751381215469613, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 132, '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': '6652977', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1443, 'n_words': 156}