| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('transactions', function (Blueprint $table) { |
||
| 17 | $table->bigIncrements('id'); |
||
| 18 | $table->unsignedBigInteger('donator_id'); |
||
| 19 | $table->unsignedBigInteger('campaign_id'); |
||
| 20 | $table->unsignedBigInteger('subscription_id')->nullable(); |
||
| 21 | $table->string('payment_gateway'); |
||
| 22 | $table->string('payment_gateway_transaction_id')->comment('Native trsanction ID on PG'); |
||
| 23 | $table->unsignedBigInteger('amount')->comment('Amount in cents'); |
||
| 24 | $table->string('currency', 3); |
||
| 25 | $table->string('status'); |
||
| 26 | $table->string('status_message'); |
||
| 27 | $table->timestamps(); |
||
| 28 | |||
| 29 | $table->foreign('donator_id')->references('id')->on('donators'); |
||
| 30 | $table->foreign('campaign_id')->references('id')->on('campaigns'); |
||
| 31 | $table->foreign('subscription_id')->references('id')->on('subscriptions'); |
||
| 32 | }); |
||
| 45 |