Skip to content

Commit

Permalink
subscription authorization fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timoladoyinbo committed May 7, 2024
1 parent 2208f9c commit 96fee61
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 179 deletions.
4 changes: 2 additions & 2 deletions database/migrations/create_subscription_tables.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CreateSubscriptionTables extends Migration
*/
Schema::create('dk_subscriptions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger(app(config('paystacksubscription.model'))->getForeignKey());
$table->string('name');
$table->string('paystack_id')->unique();
$table->string('paystack_status');
Expand All @@ -39,7 +39,7 @@ class CreateSubscriptionTables extends Migration
$table->timestamp('ends_at')->nullable();
$table->timestamps();

$table->index(['user_id', 'paystack_status']);
$table->index([app(config('paystacksubscription.model'))->getForeignKey(), 'paystack_status']);
});
}

Expand Down
Loading

0 comments on commit 96fee61

Please sign in to comment.