mysql在'字段列表'中抛出未知列'mac'

时间:2014-06-20 13:35:32

标签: mysql wso2 wso2carbon

org.mozilla.javascript.WrappedException:  Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:    Unknown column 'mac' in 'field list' ([driver]/driver.js#32)

从1.0.0升级后,我在Wso2 EMM 1.1.0中遇到此错误

在为wso2emm_db迁移mysql数据库时是否有人遇到此问题?

1 个答案:

答案 0 :(得分:4)

设备表的mysql.sql脚本存在问题,并且已在 public JIRA 中报告。在<PRODUCT_HOME>/dbscripts/emm/mysql.sql中,将设备表格的wifi_mac字段更改为mac,如下所示:

CREATE TABLE IF NOT EXISTS `devices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tenant_id` int(11) DEFAULT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `platform_id` int(11) DEFAULT NULL,
  `reg_id` longtext,
  `os_version` varchar(45) DEFAULT NULL,
  `properties` text,
  `created_date` datetime DEFAULT NULL,
  `status` varchar(10) DEFAULT NULL,
  `byod` smallint(6) DEFAULT '1',
  `deleted` int(11) DEFAULT '0',
  `vendor` varchar(11) DEFAULT NULL,
  `udid` VARCHAR(4096) NULL DEFAULT NULL,
  `push_token` VARCHAR(256) NULL DEFAULT NULL,
  **`mac`** varchar(100) NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;