Nenhuma descrição

2015_06_10_092319_add_name_to_semesters_table.php 547B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class AddNameToSemestersTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::table('semesters', function(Blueprint $table)
  13. {
  14. $table->string('name', 25)->after('code')->default('');
  15. });
  16. }
  17. /**
  18. * Reverse the migrations.
  19. *
  20. * @return void
  21. */
  22. public function down()
  23. {
  24. Schema::table('semesters', function(Blueprint $table)
  25. {
  26. $table->dropColumn('name');
  27. });
  28. }
  29. }