File: //var/www/html/spion/database/migrations/2025_01_21_073224_create_user_subscriptions_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('user_subscriptions', function (Blueprint $table) {
$table->id();
$table->string('user_id')->nullable();
$table->string('website_id')->nullable();
$table->string('rz_subscription_id')->nullable();
$table->string('plan_name')->nullable();
$table->string('customer_id')->nullable();
$table->string('rz_plan_id')->nullable();
$table->unsignedBigInteger('charge_at')->comment('Next Renewal Date')->nullable();
$table->unsignedBigInteger('start_at')->comment('Subscription start')->nullable();
$table->unsignedBigInteger('end_at')->comment('Subscription end')->nullable();
$table->integer('rz_quantity')->nullable();
$table->unsignedTinyInteger('rz_status')->default(1)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user_subscriptions');
}
};