Files
jongryangje/writable/database/inventory_inspection_pack_snapshot_table.sql

23 lines
1.0 KiB
MySQL
Raw Normal View History

-- ============================================
-- 실사 팩 스냅샷 테이블
-- ============================================
CREATE TABLE IF NOT EXISTS `bag_inventory_inspection_pack_snapshot` (
`bisp_idx` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`bisp_bisi_idx` INT UNSIGNED NOT NULL COMMENT 'bag_inventory_inspection_item FK',
`bisp_lg_idx` INT UNSIGNED NOT NULL,
`bisp_bag_code` VARCHAR(50) NOT NULL,
`bisp_box_code` VARCHAR(80) NOT NULL DEFAULT '',
`bisp_pack_code` VARCHAR(80) NOT NULL,
`bisp_sheet_start_code` VARCHAR(120) NOT NULL,
`bisp_sheet_end_code` VARCHAR(120) NOT NULL,
`bisp_sheet_qty` INT UNSIGNED NOT NULL DEFAULT 0,
`bisp_actual_qty` INT UNSIGNED NULL DEFAULT NULL,
`bisp_diff_qty` INT NOT NULL DEFAULT 0,
`bisp_checked_yn` CHAR(1) NOT NULL DEFAULT 'N',
`bisp_regdate` DATETIME NOT NULL,
PRIMARY KEY (`bisp_idx`),
UNIQUE KEY `uk_bisp_item_pack` (`bisp_bisi_idx`, `bisp_pack_code`),
KEY `idx_bisp_item` (`bisp_bisi_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='실사 팩 스냅샷';