Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
gilour
/
database
/
migrations
:
2019_01_18_095309_create_stripe_invoices_table.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateStripeInvoicesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('stripe_invoices', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('company_id'); $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade'); $table->string('invoice_id'); $table->unsignedInteger('subscription_plan_id'); $table->foreign('subscription_plan_id')->references('id')->on('subscription_plans')->onDelete('cascade')->onUpdate('cascade'); $table->string('transaction_id'); $table->unsignedDecimal('amount', 12, 2); $table->date('pay_date'); $table->date('next_pay_date')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('stripe_invoices'); } }