增加数据库脚本

This commit is contained in:
lin
2025-05-19 10:39:49 +08:00
parent c981e7f470
commit 5224f2b5c0
7 changed files with 979 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
/*
* 20250519
*/
DELIMITER // -- 重定义分隔符避免分号冲突
CREATE PROCEDURE `wvp_20250519`()
BEGIN
IF NOT EXISTS (SELECT column_name FROM information_schema.columns
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device' and column_name = 'device_type')
THEN
ALTER TABLE wvp_device ADD device_type integer;
END IF;
END; //
call wvp_20250519();
DROP PROCEDURE wvp_20250519;
DELIMITER ;