Skip to content

Commit

Permalink
Bigger string column max lengths and a small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dansuf committed May 9, 2018
1 parent 8c82ba6 commit 4bc4e39
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
*
* @property string friendly_title Title that is friendly to a patient
* @property string friendly_description Description that is friendly to a patient
* @property int continuous_field_max Maximum input value (Applies only to continuous fields)
* @property int continuous_field_min Minimum input value (Applies only to continuous fields)
* @property int continuous_field_step_by Interval between possible input values (Applies only to continuous fields)
* @property int continuous_field_unit Unit of the value (kilograms, years, etc.) (Applies only to continuous fields)
* @property int evidencio_variable_id #TODO desc
* @property int continuous_field_max Maximum input value (Applies only to
* continuous fields)
* @property int continuous_field_min Minimum input value (Applies only to
* continuous fields)
* @property int continuous_field_step_by Interval between possible input values
* (Applies only to continuous fields)
* @property int continuous_field_unit Unit of the value (kilograms, years, etc.)
* (Applies only to continuous fields)
* @property int evidencio_variable_id Evidencio API variable id associated with
* this field in the designer page
*/
class Field extends Model
{
Expand Down
89 changes: 89 additions & 0 deletions database/migrations/2018_05_09_111504_longer_max_field_values.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?php

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

class LongerMaxFieldValues extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('registration_documents', function (Blueprint $table) {
$table->string('name',255)->change();
});

Schema::table('users', function (Blueprint $table) {
$table->string('first_name',255)->change();
$table->string('last_name',255)->change();
$table->string('organisation',255)->nullable()->change();
$table->string('academic_degree',30)->nullable()->change();
});

Schema::table('workflows', function (Blueprint $table) {
$table->string('title',255)->change();
});

Schema::table('steps', function (Blueprint $table) {
$table->string('title',255)->change();
});

Schema::table('next_steps', function (Blueprint $table) {
$table->string('title',255)->nullable()->change();
});

Schema::table('results', function (Blueprint $table) {
$table->string('representation_label',255)->nullable()->change();
});

Schema::table('fields', function (Blueprint $table) {
$table->string('friendly_title',255)->change();
$table->string('continuous_field_unit',30)->nullable()->change();
});

}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('registration_documents', function (Blueprint $table) {
$table->string('name',30)->change();
});

Schema::table('users', function (Blueprint $table) {
$table->string('first_name',30)->change();
$table->string('last_name',30)->change();
$table->string('organisation',50)->nullable()->change();
$table->string('academic_degree',10)->nullable()->change();
});

Schema::table('workflows', function (Blueprint $table) {
$table->string('title',30)->change();
});

Schema::table('steps', function (Blueprint $table) {
$table->string('title',30)->change();
});

Schema::table('next_steps', function (Blueprint $table) {
$table->string('title',30)->nullable()->change();
});

Schema::table('results', function (Blueprint $table) {
$table->string('representation_label',40)->nullable()->change();
});

Schema::table('fields', function (Blueprint $table) {
$table->string('continuous_field_unit',15)->nullable()->change();
$table->string('friendly_title',40)->change();
});
}
}

0 comments on commit 4bc4e39

Please sign in to comment.