Frontend dashboard, shipment, invoice , customer
This commit is contained in:
@@ -8,23 +8,16 @@ return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('invoice_installments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('invoice_id');
|
||||
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
|
||||
|
||||
$table->date('installment_date');
|
||||
$table->string('payment_method')->nullable(); // cash, bank, UPI, cheque, etc
|
||||
$table->string('reference_no')->nullable();
|
||||
$table->decimal('amount', 10, 2);
|
||||
|
||||
$table->timestamps();
|
||||
// Table already exists. Add updates here if needed.
|
||||
Schema::table('invoice_installments', function (Blueprint $table) {
|
||||
// nothing to update
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('invoice_installments');
|
||||
Schema::table('invoice_installments', function (Blueprint $table) {
|
||||
// nothing to rollback
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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('order_items', function (Blueprint $table) {
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('order_items', function (Blueprint $table) {
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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('order_items', function (Blueprint $table) {
|
||||
if (! Schema::hasColumn('order_items', 'deleted_at')) {
|
||||
$table->softDeletes(); // adds deleted_at (nullable timestamp)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('order_items', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('order_items', 'deleted_at')) {
|
||||
$table->dropSoftDeletes(); // drops deleted_at
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user