Last active
July 29, 2021 02:39
-
-
Save abishekrsrikaanth/eee48cd92367b54c4783a27de5c092a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class CreateStripePlansTable extends Migration | |
{ | |
public function up(): void | |
{ | |
Schema::create('stripe_plans', function (Blueprint $table) { | |
$table->id(); | |
$table->string('name'); | |
$table->string('description'); | |
$table->string('stripe_plan_id')->nullable(); //nullable as this will be empty till a stripe plan is created using the stripe api and an id is obtained | |
$table->string('stripe_product_id')->nullable(); //nullable as this will be empty till a stripe plan is created using the stripe api and an id is obtained | |
$table->string('features'); | |
$table->integer('amount'); //amount stored in cents | |
$table->timestamps(); | |
}); | |
} | |
public function down(): void | |
{ | |
Schema::dropIfExists('stripe_plans'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment