feat:재무관리 컬럼 추가 마이그레이션 (tax_type, tax_invoice_issued, deduction_type)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-05 18:08:01 +09:00
parent bc23debb26
commit 44079f0f0e

View File

@@ -0,0 +1,41 @@
<?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
{
// sales_records: tax_type 컬럼 추가
Schema::table('sales_records', function (Blueprint $table) {
$table->string('tax_type', 20)->default('taxable')->after('record_type');
});
// payables: tax_invoice_issued 컬럼 추가
Schema::table('payables', function (Blueprint $table) {
$table->boolean('tax_invoice_issued')->default(false)->after('memo');
});
// card_transactions: deduction_type 컬럼 추가 (공제/불공제 구분)
Schema::table('card_transactions', function (Blueprint $table) {
$table->string('deduction_type', 20)->default('deductible')->after('status');
});
}
public function down(): void
{
Schema::table('sales_records', function (Blueprint $table) {
$table->dropColumn('tax_type');
});
Schema::table('payables', function (Blueprint $table) {
$table->dropColumn('tax_invoice_issued');
});
Schema::table('card_transactions', function (Blueprint $table) {
$table->dropColumn('deduction_type');
});
}
};