Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function up(): void |
||
32 | { |
||
33 | Schema::create($this->table(), function(Blueprint $table) { |
||
34 | $table->increments('id'); |
||
35 | $table->morphs('from'); |
||
36 | $table->morphs('to'); |
||
37 | $table->unsignedInteger('deposit_id'); |
||
38 | $table->unsignedInteger('withdraw_id'); |
||
39 | $table->uuid('uuid')->unique(); |
||
40 | $table->timestamps(); |
||
41 | |||
42 | $table->foreign('deposit_id') |
||
43 | ->references('id') |
||
44 | ->on($this->transactionTable()) |
||
45 | ->onDelete('cascade'); |
||
46 | |||
47 | $table->foreign('withdraw_id') |
||
48 | ->references('id') |
||
49 | ->on($this->transactionTable()) |
||
50 | ->onDelete('cascade'); |
||
51 | }); |
||
63 |