You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
832 B
MySQL
18 lines
832 B
MySQL
1 month ago
|
# 无人机维修设备更换记录
|
||
|
create table uav_device_replace_record
|
||
|
(
|
||
|
id int primary key auto_increment comment '主键id',
|
||
|
repair_record_id int not null comment '维修记录id',
|
||
|
old_device_id int not null comment '旧设备id',
|
||
|
new_device_id int not null comment '新设备id',
|
||
|
is_replace tinyint not null comment '是否更换设备: 0-否, 1-是',
|
||
|
create_time datetime,
|
||
|
update_time datetime,
|
||
|
|
||
|
key idx_repair_id (repair_record_id),
|
||
|
|
||
|
# // TODO 2025/6/4: 删除物理外键
|
||
|
foreign key (repair_record_id) references device_repair_record (id),
|
||
|
foreign key (old_device_id) references device_info (id),
|
||
|
foreign key (new_device_id) references device_info (id)
|
||
|
) comment '维修更换设备记录表';
|