x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

LimeSurvey 7 Major Version Upgrade

From LimeSurvey Manual

This page contains changes which are not marked for translation.


Major Version Upgrade - LimeSurvey 7

LimeSurvey 7 introduces a major cleanup of how response tables and fieldnames are generated. This update modernizes long-standing internal naming conventions and creates a more predictable and robust foundation for plugins, integrations, and future development.

Because this is a structural change, any custom work that relies on old naming may require updates. This page explains what changes, how to test safely, and how to prepare for upgrading.

1. What changes

1.1 New table names

LimeSurvey now uses a consistent naming scheme for response-related tables.

Old table name New table name
old_survey_<sid>_<timestamp> old_responses_<sid>_<timestamp>
old_survey_<sid>_timings_<timestamp> old_timings_<sid>_<timestamp>
survey_<sid> responses_<sid>
survey_<sid>_timings timings_<sid>

Any SQL queries, integrations, or plugins referencing these tables may require adjustments.

1.2 New fieldname structure

Fieldnames now follow a predictable and consistent format. Examples:

  • Q<questionId> - root question
  • Q<questionId>_S<subquestionId> - subquestions
  • Q<questionId>_C<suffix> - comment or other fields
  • ranking fields: Q<qid>_R<aid>
  • timing fields: question-level or group-level depending on context

This replaces the legacy sidXgidXqid based naming.


2. Why this matters

This cleanup addresses naming patterns that were formally defined and used over many years and brings them into a consistent and robost structure we can build on for the future.

Structural changes like this are rarely simple. They touch parts of the system that many plugins and integrations rely on, which is why they are often postponed due to their complexity. But keeping things consistent and predictable is important for long-term stability.

By addressing this now, we make LimeSurvey cleaner and easier to extend, even if the change is mostly invisible on the surface.

3. How to preview new fieldnames

To see how any existing fieldname will map to the new LS7 structure, you can perform the following steps:

  1. Backup the database, as the changes are not reversible and if it goes wrong, it will be useful to have the database prior the change to recover
  2. Checkout the tablename/fieldname refactor epic:
    git checkout epic/LE-33-tablename-fieldname-refactoring
    or to clone/download the project directly at this branch at https://github.com/LimeSurvey/LimeSurvey/tree/epic/LE-33-tablename-fieldname-refactoring
  3. Load an admin page to trigger the change script
  4. Report any error you may get during the execution of the change script
  5. Study the new tablenames and fieldnames
  6. Test your plugins/themes and fix errors related to tablenames and/or fieldnames

The function used to convert old fieldnames into new fieldnames is the following:

getFieldName($tableName, $fieldName, $questions, $sid, $gid, $cd)

Parameters

  • $tableName - original table name
  • $fieldName - original fieldname
  • $questions - root question and its subquestions
  • $sid - survey ID
  • $gid - group ID
  • $cd - whether condition designer logic applies

Result

The function returns the new LS7 fieldname for that response field.

4. How to test the changes safely

It is strongly recommended to test LS7 in a dedicated environment before upgrading production systems.

4.1 Install LS7 in a separate environment

Download the latest LS7 beta from:

https://community.limesurvey.org

Install it separately from your current setup.

4.2 Import your existing assets

Test using:

  • surveys
  • survey themes
  • admin themes
  • question themes
  • plugins
  • custom JavaScript
  • any custom integrations you have built
  • or anything else you might worry about.

Check if everything works as expected with the new table and fieldname naming. Update any code that relies on the old naming.

4.3 How to Trigger the migration?

If you want to preview the migration logic in your test installation:

  1. Back up your database.
  2. Install the LS7 beta build.
  3. Load any admin page to run the migration script.
  4. Review table and fieldname changes.
  5. Test the application.
  6. Update custom code if necessary.

4.4 Report issues

Thanks for testing this early. If you spot anything that looks off from the core, please report it so we can fix it as soon as possible.

https://bugs.limesurvey.org

5. What may require updates

The following may need adjustments:

  • plugins referencing old fieldnames or table names
  • any custom integrations you have built
  • JavaScript using fieldname based selectors
  • custom themes interacting with response related identifiers
  • integrations dependent on the previous naming scheme
  • importing old exports such as survey, themes, question themes etc.

This is expected and part of the upgrade process.

6. Summary

  • LS7 Beta 1 introduces a complete cleanup of response table and fieldname naming
  • This is the primary structural backend change for LS7
  • Testing in a separate environment is strongly recommended
  • getFieldName() helps preview future naming
  • Update custom code where required
  • Report issues early to help stabilize the final release