Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abishekrsrikaanth/eee48cd92367b54c4783a27de5c092a7 to your computer and use it in GitHub Desktop.
Save abishekrsrikaanth/eee48cd92367b54c4783a27de5c092a7 to your computer and use it in GitHub Desktop.
<?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