| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 25 | public function up(): void |
||
| 26 | { |
||
| 27 | Schema::create('love_reactant_reaction_totals', function (Blueprint $table) { |
||
| 28 | $table->bigIncrements('id'); |
||
| 29 | $table->unsignedBigInteger('reactant_id'); |
||
| 30 | $table->unsignedBigInteger('count')->default(0); |
||
| 31 | $table->bigInteger('weight')->default(0); |
||
| 32 | $table->timestamps(); |
||
| 33 | |||
| 34 | $table->index('reactant_id'); |
||
| 35 | |||
| 36 | $table |
||
| 37 | ->foreign('reactant_id') |
||
| 38 | ->references('id') |
||
| 39 | ->on('love_reactants') |
||
| 40 | ->onDelete('cascade'); |
||
| 41 | }); |
||
| 54 |