3.5K Unstar Star 9.6K Fork 4.1K

卓源软件 / JeeSite 4.2Java

初始化数据库js_sys_user_data_scope表报错

Closed
肖骁  Opened this issue

用initCoreData()初始化数据库的时候报错

### Error updating database.  Cause: java.sql.SQLException: Field 'user_code' doesn't have a default value
### The error may involve com.jeesite.modules.sys.dao.UserDataScopeDao.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO js_sys_user_data_scope (`ctrl_type`, `ctrl_data`, `ctrl_permi`) VALUES (?, ?, ?)
### Cause: java.sql.SQLException: Field 'user_code' doesn't have a default value
; SQL []; Field 'user_code' doesn't have a default value; nested exception is java.sql.SQLException: Field 'user_code' doesn't have a default value

js_sys_user_data_scope 里面user_code非空又没默认值,为啥执行sql的时候不插这个值?还是我哪里配错了

124627 niaoshuai admin 1578918631 6732 thinkgem 1578914432 805126 shawnshowxiao 1578933319 total 4 participants

Comments (3)

Mr.刘欧巴 2018-09-13 17:00

同问

124627 niaoshuai admin 1578918631
niaoshuai 2018-09-14 09:22

我手动改了 在初始化数据库增加了一个默认值 ''

6732 thinkgem 1578914432
卓源软件 2018-09-14 21:44 owner

新增的自动授权部分权限,忽略了在init-db时没有当前用户数据,此问题已修正,谢谢反馈。您再重新打包就行。

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.2

Search