Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function up(): void |
||
23 | { |
||
24 | Schema::create($this->table(), function(Blueprint $table) { |
||
25 | $table->increments('id'); |
||
26 | $table->morphs('payable'); |
||
27 | $table->enum('type', ['deposit', 'withdraw'])->index(); |
||
28 | $table->bigInteger('amount'); |
||
29 | $table->boolean('confirmed'); |
||
30 | $table->json('meta')->nullable(); |
||
31 | $table->uuid('uuid')->unique(); |
||
32 | $table->timestamps(); |
||
33 | |||
34 | $table->index(['payable_type', 'payable_id', 'type'], 'payable_type_ind'); |
||
35 | $table->index(['payable_type', 'payable_id', 'confirmed'], 'payable_confirmed_ind'); |
||
36 | $table->index(['payable_type', 'payable_id', 'type', 'confirmed'], 'payable_type_confirmed_ind'); |
||
37 | }); |
||
49 |