31 lines
1.0 KiB
PHP
31 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('plans', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name', 32)->unique();
|
|
$table->string('stripe_price_id')->nullable();
|
|
$table->unsignedInteger('monthly_price_cents')->default(0);
|
|
$table->unsignedSmallInteger('workspace_limit')->default(1);
|
|
$table->unsignedSmallInteger('member_limit')->default(1);
|
|
$table->unsignedSmallInteger('custom_domain_limit')->default(0);
|
|
$table->unsignedInteger('link_limit')->default(50);
|
|
$table->unsignedBigInteger('click_limit_monthly')->default(1000);
|
|
$table->json('features')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('plans');
|
|
}
|
|
};
|