12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
-
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
-
- class AddColumnsToAssessmentsTable extends Migration {
-
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('assessments', function(Blueprint $table)
- {
- $table->text('scores')->nullable();
- $table->integer('total')->nullable();
- $table->decimal('average', 5, 2)->nullable();
- });
- }
-
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('assessments', function(Blueprint $table)
- {
- $table->dropColumn(array('scores', 'total', 'average'));
- });
- }
-
- }
|