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

Database versioning

From LimeSurvey Manual

Revision as of 13:43, 17 July 2012 by C schmitz (talk | contribs)

General

This page is a stump and tries to explain how to raise the DBVersion number and where to make changes in the source code. These instructions apply to v 2.0 or later.

You will typically need this if you are a LimeSurvey developer and want to introduce changes to the database. Please note: Do not introduce database changes on a stable version.

Steps to add a new DB version\changes to the existing database

  • Open \application\config\version.php and raise the $dbversion variable by one. For example if the current DBversion is 180 make it 181.
  • Open each file in \installer\sql and add the necessary changes. Make sure the changes are consistent across all three files. Pay attention to the database specific field types (check out other tables for comparison/examples). Important: If you need to use field type 'text' then make it 'varchar(max)' in MSSQL.
  • In each file in \installer\sql edit the last SQL statement in each to reflect the new dbversion number.
  • Open \application\helpers\update\updatedb_helper and in the end of the function db_upgrade_all() add a new conditional code block that does the necessary updates to the database scheme of the previous version. If you are using the proper functions the changes will be cross-DB compatible - check out how it is done in previous conditional blocks.