Ingen beskrivning

2015_01_12_222859_add_columns_to_assessments_table.php 654B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class AddColumnsToAssessmentsTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::table('assessments', function(Blueprint $table)
  13. {
  14. $table->text('scores')->nullable();
  15. $table->integer('total')->nullable();
  16. $table->decimal('average', 5, 2)->nullable();
  17. });
  18. }
  19. /**
  20. * Reverse the migrations.
  21. *
  22. * @return void
  23. */
  24. public function down()
  25. {
  26. Schema::table('assessments', function(Blueprint $table)
  27. {
  28. $table->dropColumn(array('scores', 'total', 'average'));
  29. });
  30. }
  31. }