Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('subscriptions', function (Blueprint $table) { |
||
17 | $table->bigIncrements('id'); |
||
18 | $table->unsignedBigInteger('donator_id'); |
||
19 | $table->unsignedBigInteger('campaign_id'); |
||
20 | $table->string('payment_gateway'); |
||
21 | $table->string('payment_gateway_subscription_id')->comment('Native subscription ID on PG'); |
||
22 | $table->unsignedInteger('amount')->comment('Amount in cents'); |
||
23 | $table->string('currency', 3); |
||
24 | $table->string('payment_interval')->comment('An ISO 8601 repeating interval specification'); |
||
25 | $table->timestamps(); |
||
26 | |||
27 | $table->foreign('donator_id')->references('id')->on('donators'); |
||
28 | $table->foreign('campaign_id')->references('id')->on('campaigns'); |
||
29 | }); |
||
42 |