12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
-
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
-
- class AddSchoolAndConcentrationCodesToStudentsTable extends Migration {
-
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('students', function(Blueprint $table)
- {
- $table->char('school_code', 2)->after('name')->nullable();
- $table->char('conc_code', 4)->after('school_code')->nullable();
- });
- }
-
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('students', function(Blueprint $table)
- {
- $table->dropColumn(array('school_code', 'conc_code'));
-
- });
- }
-
- }
|