| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function down() |
||
| 25 | { |
||
| 26 | Schema::create('applicant_profile_question_translations', function(Blueprint $table) |
||
| 27 | { |
||
| 28 | $table->increments('id'); |
||
| 29 | $table->integer('applicant_profile_question_id')->unsigned()->index('applicant_profile_question_trans_applicant_profile_question_idx'); //Custom index name because exceeds length limit |
||
| 30 | $table->string('locale'); |
||
| 31 | $table->text('value'); |
||
| 32 | $table->text('description'); |
||
| 33 | $table->timestamps(); |
||
| 34 | |||
| 35 | $table->unique(['applicant_profile_question_id','locale'], 'app_profile_ques_trans_app_profile_question_id_locale_unique'); |
||
| 36 | }); |
||
| 37 | |||
| 38 | Schema::table('applicant_profile_question_translations', function(Blueprint $table) |
||
| 39 | { |
||
| 40 | //Custom foreign key name because default exceeds length limit |
||
| 41 | $table->foreign('applicant_profile_question_id', 'applicant_profile_question_trans_applicant_profile_question_fk')->references('id')->on('applicant_profile_questions')->onUpdate('CASCADE')->onDelete('CASCADE'); |
||
| 42 | }); |
||
| 45 |