fix(purchase): year_month 예약어 백틱 처리

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-13 21:58:54 +09:00
parent aacd18be1c
commit cea72b1858

View File

@@ -86,7 +86,7 @@ CREATE TABLE IF NOT EXISTS consumable_price_history (
-- 월간 정산
CREATE TABLE IF NOT EXISTS monthly_settlements (
settlement_id INT AUTO_INCREMENT PRIMARY KEY,
year_month VARCHAR(7) NOT NULL COMMENT 'YYYY-MM',
`year_month` VARCHAR(7) NOT NULL COMMENT 'YYYY-MM',
vendor_id INT NOT NULL,
total_amount DECIMAL(12,0) DEFAULT 0,
status ENUM('pending','completed') DEFAULT 'pending',
@@ -96,7 +96,7 @@ CREATE TABLE IF NOT EXISTS monthly_settlements (
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (vendor_id) REFERENCES vendors(vendor_id),
UNIQUE KEY uq_ym_vendor (year_month, vendor_id)
UNIQUE KEY uq_ym_vendor (`year_month`, vendor_id)
);
-- 페이지 키 등록