Remove leftover invoice mini_payments migrations blocking deploy.
Deploy Ladill Woo Manager / deploy (push) Failing after 38s
Deploy Ladill Woo Manager / deploy (push) Failing after 38s
These referenced qr_codes from the invoice scaffold and failed on a fresh woo database. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
<?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('mini_payments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('qr_code_id')->constrained('qr_codes')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('reference', 32)->unique();
|
||||
$table->unsignedInteger('amount_minor');
|
||||
$table->string('currency', 3)->default('GHS');
|
||||
$table->unsignedInteger('platform_fee_minor')->default(0);
|
||||
$table->unsignedInteger('merchant_amount_minor')->default(0);
|
||||
$table->string('payer_name')->nullable();
|
||||
$table->string('payer_email')->nullable();
|
||||
$table->string('payer_phone', 32)->nullable();
|
||||
$table->string('payer_note')->nullable();
|
||||
$table->string('status', 16)->default('pending');
|
||||
$table->string('payment_reference', 64)->nullable()->unique();
|
||||
$table->timestamp('paid_at')->nullable();
|
||||
$table->json('metadata')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['user_id', 'status', 'paid_at']);
|
||||
$table->index(['qr_code_id', 'status']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('mini_payments');
|
||||
}
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
<?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::table('mini_payments', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('pay_order_id')->nullable()->after('id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('mini_payments', function (Blueprint $table) {
|
||||
$table->dropColumn('pay_order_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user