暂无描述

2016_08_11_151247_add_year_start_and_year_end_to_annual_plans_table.php 643B

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