Missing table in mysql 5.7.17
- Status
- Closed
- Subject
- Missing table in mysql 5.7.17
- Version
- 16.x
- Category
- Error
- Feature
- Database MySQL (MyISAM)
- Resolution status
- Fixed or Solved
- Submitted by
- bfitz
- Volunteered to solve
- Jonny Bradley
- Lastmod by
- bfitz
- Rating
- Description
The database table tiki_user_assigned_modules is not created on install. I am using mysql version 5.7.17, but the error may occur on other versions.
The query that creates the table:
DROP TABLE IF EXISTS `tiki_user_assigned_modules`;
CREATE TABLE `tiki_user_assigned_modules` (
`moduleId` int(8) NOT NULL,
`name` varchar(200) NOT NULL default '',
`position` varchar(20) default NULL,
`ord` int(4) default NULL,
`type` char(1) default NULL,
`user` varchar(200) NOT NULL default '',
PRIMARY KEY (`name`(30),`user`,`position`, `ord`),
KEY `id` (moduleId)
) ENGINE=MyISAM;mysql throws an error of Primary Key cannot have NULL values, and the table fails to be created.
The missing table was first noticed when trying to modify the modules listed in the Assigned Modules area of the tiki-admin_modules.php page.
Suggested fix:
This table seems similar to the tiki_modules table. I would suggest modifying the position and ord columns to have the NOT NULL DEFAULT '' and '0' to match that table. I don't know what affect this will have on the tiki code overall, but it does let the database table be created.The suggested sql code then becomes:
DROP TABLE IF EXISTS `tiki_user_assigned_modules`;
CREATE TABLE `tiki_user_assigned_modules` (
`moduleId` int(8) NOT NULL,
`name` varchar(200) NOT NULL default '',
`position` varchar(20) NOT NULL default '',
`ord` int(4) NOT NULL default '0',
`type` char(1) default NULL,
`user` varchar(200) NOT NULL default '',
PRIMARY KEY (`name`(30),`user`,`position`, `ord`),
KEY `id` (moduleId)
) ENGINE=MyISAM;- Solution
- Hopefully r61917 in trunk will fix this
- Importance
- 3
- Easy to solve?
- 10 easy
- Priority
- 30
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 6298
- Created
- Tuesday 14 March, 2017 22:34:21 UTC
by bfitz - LastModif
- Monday 03 April, 2017 14:55:35 UTC