Geen omschrijving

2014_11_29_212341_create_criteria_table.php 854B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class CreateCriteriaTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::create('criteria', function(Blueprint $table)
  13. {
  14. $table->increments('id');
  15. $table->string('name');
  16. $table->text('description12');
  17. $table->text('description34');
  18. $table->text('description56');
  19. $table->text('description78');
  20. $table->integer('outcome_id')->unsigned();
  21. $table->timestamps();
  22. });
  23. Schema::table('criteria', function(Blueprint $table)
  24. {
  25. $table->foreign('outcome_id')->references('id')->on('outcomes')->onDelete('cascade')->onUpdate('cascade');
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::drop('criteria');
  36. }
  37. }