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