mysql throws Unknown column 'mac' in 'field list'

岁酱吖の 提交于 2019-12-08 03:17:09

问题


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)

I encounter this error in Wso2 EMM 1.1.0 after upgrading from 1.0.0

did anyone face this issue while migrating mysql db for wso2emm_db?


回答1:


There is an issue with the mysql.sql script for devices table and it has been reported in the public JIRA . In <PRODUCT_HOME>/dbscripts/emm/mysql.sql, change the field wifi_mac for devices table to mac as shown below:

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;


来源:https://stackoverflow.com/questions/24328578/mysql-throws-unknown-column-mac-in-field-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!