Database updates and plugin compatibility

More
5 months 3 weeks ago - 5 months 3 weeks ago #167749 by LarryF
LarryF created the topic: Database updates and plugin compatibility
Hello everyone.

I'm a new Lime user (developer actually) and I need to create a light CATI plugin for LimeSurvey.
In order to do so I shall have to modify the DB structure (add a table or modify a pre-existing one) and I was wondering how this should be done so that when I have to update Lime and the DB it still works.

I looked around quite a bit and didn't find the answer to this question. The page on DB versioning seems to be for creating content for the core application rather than for plugins.

Limesurvey version : latest (at the moment 3.7)

Is there a way to keep this clean ?

Best regards,

Larry
Last Edit: 5 months 3 weeks ago by LarryF.

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago #167916 by DenisChenu
DenisChenu replied the topic: Database updates and plugin compatibility
You can create a table in plugin, API is ready for this. But more : you can directly use Yii

Simple way to create a table : gitlab.com/SondagesPro/reloadAnyResponse...AnyResponse.php#L267

After : if you create a plugin for 3.X : he must work on 3.X version. Can be broken in 4.0 version, but if you use only clean code (and not some hack like me …) then it can work after.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: LouisGac, LarryF

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #167942 by LarryF
LarryF replied the topic: Database updates and plugin compatibility
The second part of your answer was what I needed. I'll just try to write clean code then ;)

Thank you for your time DenisChenu.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!