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:
+12
-12
@@ -38,11 +38,17 @@ jobs:
|
||||
clone --depth 1 --single-branch --no-tags --branch "${{ gitea.ref_name }}" \
|
||||
"$REPO_URL" "$WORKSPACE"
|
||||
|
||||
- name: Setup Node.js
|
||||
- name: Build frontend assets
|
||||
shell: bash {0}
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
if [ ! -x "$NODE_ROOT/bin/node" ]; then
|
||||
cd "$WORKSPACE"
|
||||
if command -v npm >/dev/null 2>&1 && npm -v >/dev/null 2>&1; then
|
||||
NPM_BIN="$(command -v npm)"
|
||||
elif [ -x "$NODE_ROOT/bin/npm" ]; then
|
||||
export PATH="$NODE_ROOT/bin:$PATH"
|
||||
NPM_BIN="$NODE_ROOT/bin/npm"
|
||||
else
|
||||
rm -rf "$NODE_ROOT"
|
||||
mkdir -p "$NODE_ROOT"
|
||||
case "$(uname -m)" in
|
||||
@@ -52,17 +58,11 @@ jobs:
|
||||
esac
|
||||
curl -fsSL "https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" \
|
||||
| tar -xJ --strip-components=1 -C "$NODE_ROOT"
|
||||
export PATH="$NODE_ROOT/bin:$PATH"
|
||||
NPM_BIN="$NODE_ROOT/bin/npm"
|
||||
fi
|
||||
"$NODE_ROOT/bin/node" -v
|
||||
|
||||
- name: Build frontend assets
|
||||
shell: bash {0}
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
cd "$WORKSPACE"
|
||||
export PATH="$NODE_ROOT/bin:$PATH"
|
||||
npm ci --no-audit --no-fund
|
||||
npm run build
|
||||
"$NPM_BIN" ci --no-audit --no-fund
|
||||
"$NPM_BIN" run build
|
||||
|
||||
- name: Build release archive
|
||||
shell: bash {0}
|
||||
|
||||
@@ -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