-- user_devices.id is a table-local AUTO_INCREMENT row key, not Snowflake. -- Business identity remains (user_id, device_id). Existing Snowflake values stay; new rows continue from MAX(id)+1. ALTER TABLE user_devices MODIFY COLUMN id BIGINT NOT NULL AUTO_INCREMENT COMMENT '行 id,表内自增,仅内部用;业务唯一键是 (user_id, device_id)';