BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
public_html
/
app.imagivibe.com
/
database
/
migrations
📤 Upload
📝 New File
📁 New Folder
Close
Editing: 2023_07_24_103747_create_subscriptions_yokassa_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('subscriptions_yokassa', function (Blueprint $table) { $table->id(); $table->foreignId('user_id'); $table->unsignedBigInteger('plan_id')->nullable(); $table->foreign('plan_id')->references('id')->on('plans')->nullOnDelete(); $table->string('name'); $table->string('payment_method_id')->nullabe(); $table->string('subscription_status')->nullabe(); $table->timestamp('trial_ends_at')->nullable(); $table->timestamp('ends_at')->nullable(); $table->timestamp('next_pay_at')->nullable(); $table->timestamps(); $table->index(['user_id', 'subscription_status']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('subscriptions_yokassa'); } };
Save
Cancel