Actions

Database documentation

From LimeSurvey Manual

Database schema

A database schema of LimeSurvey CE version 5.4.x and later can be viewed under https://manual.limesurvey.org/limesurvey/LimeSurvey-5.x-database-schema.html

List of tables

Without prefix, these are all persisten tables, as of 2022-09-15:

answer_l10ns                     
answers                          
archived_table_settings          
assessments                      
asset_version                    
boxes                            
conditions                       
defaultvalue_l10ns               
defaultvalues                    
expression_errors                
failed_login_attempts   
failed_emails         
group_l10ns                      
groups                           
label_l10ns                      
labels                           
labelsets                        
map_tutorial_users               
notifications                    
participant_attribute            
participant_attribute_names      
participant_attribute_names_lang 
participant_attribute_values     
participant_shares               
participants                     
permissions                      
permissiontemplates              
plugin_settings                  
plugins                          
question_attributes              
question_l10ns                   
question_themes                  
questions                        
quota                            
quota_languagesettings           
quota_members                    
saved_control                    
sessions                         
settings_global                  
settings_user                       
survey_links                     
survey_url_parameters            
surveymenu                       
surveymenu_entries               
surveys                          
surveys_groups                   
surveys_groupsettings            
surveys_languagesettings         
template_configuration           
templates                        
tutorial_entries                 
tutorial_entry_relation          
tutorials                        
user_groups                      
user_in_groups                   
user_in_permissionrole           
users

archived_table_settings

The table used to store the state of encryption set for the curently archived table that will be needed to restore them to the appropriate status.

Columns:

Name Type Null Key Default Extra Description
id int(11) NO PRI NULL auto_increment
survey_id int(11) NO NULL
user_id int(11) NO NULL
tbl_name varchar(255) NO NULL The table the setting belongs to (e.a. old_survey_367888_timings_20210809100945, old_survey_367888_20210624125341, old_tokens_367888_20210809100945)
tbl_type varchar(10) NO NULL The type of the table (timings,response,token)
created datetime NO NULL The date the entry was created
properties text NO NULL The default settings for the current table as json (varies based on which type) e.a. tokenencryptionoptions. The json can contain only 'unknown' which means the status of the encryption could not determined during implementation of the table.
attributes text YES NULL NULL custom settings that are not stored together with default settings like "attributedescriptions". The json can contain only 'unknown' which means the status of the encryption could not determined during implementation of the table.

question_themes

Also see Question themes.

Columns:

Name Type Null Key Default Extra Description
id int(11) NO PRI NULL auto_increment
name varchar(150) NO MUL NULL
visible varchar(1) YES NULL
xml_path varchar(255) YES NULL Either relative to app root dir OR absolute path
image_path varchar(255) YES NULL
title varchar(100) NO NULL
creation_date datetime YES NULL
author varchar(150) YES NULL
author_email varchar(255) YES NULL
author_url varchar(255) YES NULL
copyright text YES NULL
license text YES NULL
version varchar(45) YES NULL
api_version varchar(45) NO NULL
description text YES NULL
last_update datetime YES NULL
owner_id int(11) YES NULL User id of owner
theme_type varchar(150) YES NULL Always "question_theme" right now; TODO: Delete? theme type is assumed from database table
question_type varchar(150) NO NULL Single-letter question type
core_theme tinyint(1) YES NULL Core theme = included in main git repository
extends varchar(150) YES NULL If this theme extends another theme (can be both core and user uploaded theme)
group varchar(150) YES NULL Question type group (array, single-choice, etc); used in the question type selector
settings text YES NULL JSON string; copied from metadata, but only subquestions, answerscales, hasdefaultvalues, asssessable, class (CSS). TODO: Move these five settings to <settings> section in config.xml.

failed_emails

Also see the Failed email notifications manual page

Columns:

Name Type Allow Null Key Default Extra Description
id int(11) NO PRI NULL auto_increment
surveyid int(11)) NO NULL The survey ID
responseid int(11) NO NULL The response ID
email_type varchar(200) NO NULL The email type, for Detailed Email Notification('admin_responses'), for Basic admin notification('admin_notification')
recipient varchar(320) NO NULL The email address of the recipient
language varchar(20) NO NULL Language code of the email
error_message text YES NULL The error message from mailer
created datetime NO NULL When the email failed the first time
status varchar(20) YES NULL The current status of the entry 'SEND FAILED' or 'SEND SUCCESS'
updated datetime YES NULL When the failed email entry as updated last.
resend_vars text NO NULL json encoded values needed to resend the email [message_type,Subject,uniqueid,boundary[1],boundary[2],boundary[3],MIMEBody]