| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CreateTechTipsTable extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('tech_tips', function(Blueprint $table) { |
||
| 17 | $table->increments('tip_id'); |
||
| 18 | $table->integer('user_id')->unsigned(); |
||
| 19 | $table->integer('updated_id')->unsigned()->nullable(); |
||
| 20 | $table->boolean('public')->default(0); |
||
| 21 | $table->boolean('sticky')->default(0); |
||
| 22 | $table->bigInteger('tip_type_id')->unsigned(); |
||
| 23 | $table->text('subject'); |
||
| 24 | $table->longText('description'); |
||
| 25 | $table->softDeletes(); |
||
| 26 | $table->timestamps(); |
||
| 27 | $table->foreign('user_id')->references('user_id')->on('users')->onUpdate('cascade'); |
||
| 28 | $table->foreign('updated_id')->references('user_id')->on('users')->onUpdate('cascade'); |
||
| 29 | $table->foreign('tip_type_id')->references('tip_type_id')->on('tech_tip_types')->onUpdate('cascade'); |
||
| 30 | }); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Reverse the migrations. |
||
| 35 | * |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function down() |
||
| 43 |