Add PayPal support for add-on and gift voucher checkout
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?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::table('gift_vouchers', function (Blueprint $table) {
|
||||
if (! Schema::hasColumn('gift_vouchers', 'paypal_order_id')) {
|
||||
$table->string('paypal_order_id')->nullable()->after('lemonsqueezy_variant_id');
|
||||
}
|
||||
|
||||
if (! Schema::hasColumn('gift_vouchers', 'paypal_capture_id')) {
|
||||
$table->string('paypal_capture_id')->nullable()->after('paypal_order_id');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('gift_vouchers', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('gift_vouchers', 'paypal_capture_id')) {
|
||||
$table->dropColumn('paypal_capture_id');
|
||||
}
|
||||
|
||||
if (Schema::hasColumn('gift_vouchers', 'paypal_order_id')) {
|
||||
$table->dropColumn('paypal_order_id');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user