12345678910111213141516171819202122232425262728293031323334 |
- <?php
-
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
-
- class AddActivitiesRubricId extends Migration
- {
-
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('activities', function ($table) {
- $table->integer('rubric_id')->unsigned();
-
- //$table->foreign('rubric_id')->references('id')->on('rubrics')->onDelete('cascade')->onUpdate('cascade');
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('activities', function ($table) {
- $table->dropColumn('rubric_id');
- });
- }
- }
|