fix(数据库迁移): 将devices表的sourceType字段类型从TEXT改为VARCHAR(255)

This commit is contained in:
zhang1106
2026-03-20 17:21:42 +08:00
parent 73cbe4ac1b
commit a9aab04f15
+1 -1
View File
@@ -692,7 +692,7 @@ async function migrateIdleDeviceAndBusiness() {
await addColumnIfNotExists('devices', 'idleDate', 'DATETIME');
await addColumnIfNotExists('devices', 'idleReason', 'TEXT');
await addColumnIfNotExists('devices', 'warehouseId', 'VARCHAR(255)');
await addColumnIfNotExists('devices', 'sourceType', "TEXT DEFAULT 'rack'");
await addColumnIfNotExists('devices', 'sourceType', "VARCHAR(255) DEFAULT 'rack'");
}
console.log(' 空闲设备与业务关联迁移完成');