Files
KCGL/db_migrations/add_material_approval_flag.sql
yueli e03c035ee0 feat(db): material_base 增加 is_approval_required 开关列(出库/借库需审批)
- boolean NOT NULL DEFAULT false,存量默认不审批
2026-09-09 09:31:12 +08:00

11 lines
741 B
PL/PgSQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- =============================================================================
-- 一次性迁移:物料“出库/借库需审批”开关
-- material_base.is_approval_required boolean NOT NULL DEFAULT false
-- 语义:命中该标记物料的出库/借库申请仍需审批;其余默认不审批、自动通过后直接交库管执行。
-- 存量默认 false不审批需要审批的物料再在基础信息中逐个/批量勾选。
-- 执行: docker exec -i inventory_db psql -U test -d inventory_system < 本文件
-- =============================================================================
BEGIN;
ALTER TABLE material_base ADD COLUMN IF NOT EXISTS is_approval_required boolean NOT NULL DEFAULT false;
COMMIT;