diff --git a/database/migrations/2026_02_05_600000_add_tax_type_and_payable_fields.php b/database/migrations/2026_02_05_600000_add_tax_type_and_payable_fields.php new file mode 100644 index 0000000..9ce568c --- /dev/null +++ b/database/migrations/2026_02_05_600000_add_tax_type_and_payable_fields.php @@ -0,0 +1,41 @@ +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'); + }); + } +};