Update database structure for new permission system. #2