Files
cattleTransportation/tradeCattle/add_id_card_field.sql
2025-10-21 09:01:11 +08:00

25 lines
909 B
SQL
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.

-- =============================================
-- 数据库迁移脚本:为 member_driver 表添加 id_card 字段
-- 用途:存储司机身份证前后面照片地址
-- 创建时间2025-10-20
-- 数据库MySQL
-- =============================================
-- 为 member_driver 表添加 id_card 字段
-- 字段类型TEXT支持长文本
-- 位置:在 car_img 字段之后
-- 注释身份证前后面照片地址多个URL用逗号分隔
ALTER TABLE member_driver
ADD COLUMN id_card TEXT COMMENT '身份证前后面照片地址多个URL用逗号分隔'
AFTER car_img;
-- 验证字段是否添加成功
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'member_driver'
AND COLUMN_NAME = 'id_card';
-- 显示完整的表结构
DESCRIBE member_driver;