View Issue Details

IDProjectCategoryView StatusLast Update
12065Development Installationpublic2021-08-04 14:48
ReporterDenisChenu Assigned Toollehar  
PrioritynoneSeverityfeature 
Status assignedResolutionopen 
Summary12065: Update step by step
DescriptionDuring upgrade process : all DB update are done in a try, and broke one rollback transaction (and in fact unsure if it work and where it break exactly.
But all part can be separate : all part do their job and update DB, we can do in X transaction .

Then upgrade can do 111 to 150 , broke but DB are already updated partially at 150.
Additional InformationThe best are do all system in ajax, but start by separate each transation.
And allow in function a function db_upgrade_all($iOldDBVersion,$iNewDBVersion=null) maybe
TagsNo tags attached.

Users monitoring this issue

User List Mazi

Activities

DenisChenu

DenisChenu

2017-01-18 22:55

developer   ~42763

Not exactly ComfortUpdate, then remove Louis Auto assign
LouisGac

LouisGac

2017-01-19 10:18

developer   ~42765

well, the best way to do that would be to use the Yii Migrations
http://www.yiiframework.com/doc/guide/1.1/en/database.migration
DenisChenu

DenisChenu

2017-01-19 10:19

developer   ~42766

And rewrite all existing update system ... not for me ....
For next update function : yes, but for existing function : no
LouisGac

LouisGac

2017-01-19 10:30

developer   ~42767

^^
That's for me ;-)
DenisChenu

DenisChenu

2017-01-19 11:33

developer   ~42768

You really want to rewrite more than 100 function ????
LouisGac

LouisGac

2017-01-19 11:38

developer   ~42771

not now, for sure

Also: we still have to think if we provide LS3 as an update for LS2.x (via comfortUpdate, etc)

If not, or if we provide an update to LS3 only for the very last build of LS2.50, then we could start with a clean updatedb.
DenisChenu

DenisChenu

2017-01-19 11:45

developer   ~42772

Update in 2 step (for 2.59.12 or less )
1st step : update to 2.60 (for example)
2nd step : update to 3.0

why not :)
DenisChenu

DenisChenu

2017-01-19 11:46

developer   ~42773

Moved to development
ollehar

ollehar

2021-08-02 20:16

administrator   ~65779

Still relevant?
DenisChenu

DenisChenu

2021-08-02 20:24

developer   ~65780

Yes,

Clearly : someone create a step by step system ? step after step ?

idea:
1. https://github.com/LimeSurvey/LimeSurvey/blob/a889e5125ec9788f3b87807407bcb249f1c1503d/application/helpers/update/updatedb_helper.php#L46 can return a OK after one step `db_upgrade_all($iOldDBVersion, $bSilent = false, $step = null)`
2. If call via ajax : $step is 1 : return a integer
3. Call it via ajax, call it via ajax, call it via ajax … until you get false.

A lot of system do thing like this.

Alterantive : it's to show the list of big update : dolibarr for example shon
- upgrade to 10.1
- upgrade to 10.2
- upgrade to 10.3
- upgrade to 10.4

You can check one by one.
ollehar

ollehar

2021-08-02 20:35

administrator   ~65781

Sketching a refactor here: https://bugs.limesurvey.org/view.php?id=17492
ollehar

ollehar

2021-08-02 20:36

administrator   ~65782

Why would it be called with Ajax?
DenisChenu

DenisChenu

2021-08-03 11:30

developer   ~65783

OK for refactoring : but remind : you need to reconstruct whole since the first update part …

About ajax : from 2.05 to 5.X : a lot of clicki to do. If step by step by ajax : only one click, stop at the 1st error.
ollehar

ollehar

2021-08-03 11:36

administrator   ~65784

> OK for refactoring : but remind : you need to reconstruct whole since the first update part …

Yes, no logic should be deleted. I'd like to outsource most of this work.

> About ajax : from 2.05 to 5.X : a lot of clicki to do. If step by step by ajax : only one click, stop at the 1st error.

Wanting a new interface logic? But this doesn't happen so often?
DenisChenu

DenisChenu

2021-08-04 14:48

developer   ~65813

> Wanting a new interface logic? But this doesn't happen so often?

?
Not really , hard to explain.

But :
1. Do an ajax call for update
2. At line https://github.com/LimeSurvey/LimeSurvey/blob/a889e5125ec9788f3b87807407bcb249f1c1503d/application/helpers/update/updatedb_helper.php#L163 return 133
3. if result is an integer : call it again
4. if result is true : https://github.com/LimeSurvey/LimeSurvey/blob/a889e5125ec9788f3b87807407bcb249f1c1503d/application/helpers/update/updatedb_helper.php#L4775 (or result == debversion) shown a success.
5. If result is ? Json error ? HTML ? etc : show the last error https://github.com/LimeSurvey/LimeSurvey/blob/a889e5125ec9788f3b87807407bcb249f1c1503d/application/helpers/update/updatedb_helper.php#L4723

It's just an idea, need something better

Related Changesets

LimeSurvey: master 248f940d

2017-01-19 16:45:09

c_schmitz

Details Diff
Dev Divided updates in smaller transactions so if something goes wrong it is more easy to recover manually
Dev See issue 12065
Affected Issues
12065
mod - application/helpers/update/updatedb_helper.php Diff File

Issue History

Date Modified Username Field Change
2017-01-18 22:54 DenisChenu New Issue
2017-01-18 22:54 DenisChenu Status new => assigned
2017-01-18 22:54 DenisChenu Assigned To => LouisGac
2017-01-18 22:54 DenisChenu Assigned To LouisGac =>
2017-01-18 22:55 DenisChenu Status assigned => new
2017-01-18 22:55 DenisChenu Note Added: 42763
2017-01-19 10:18 LouisGac Note Added: 42765
2017-01-19 10:19 DenisChenu Note Added: 42766
2017-01-19 10:30 LouisGac Note Added: 42767
2017-01-19 11:33 DenisChenu Note Added: 42768
2017-01-19 11:38 LouisGac Note Added: 42771
2017-01-19 11:45 DenisChenu Note Added: 42772
2017-01-19 11:46 DenisChenu Project Feature requests => Development
2017-01-19 11:46 DenisChenu Note Added: 42773
2017-01-19 16:23 c_schmitz Category ComfortUpdate => Installation
2017-01-19 16:45 c_schmitz Changeset attached => LimeSurvey master 248f940d
2017-01-19 18:38 Mazi Issue Monitored: Mazi
2021-08-02 20:16 ollehar Assigned To => ollehar
2021-08-02 20:16 ollehar Status new => feedback
2021-08-02 20:16 ollehar Note Added: 65779
2021-08-02 20:24 DenisChenu Note Added: 65780
2021-08-02 20:24 DenisChenu Status feedback => assigned
2021-08-02 20:35 ollehar Note Added: 65781
2021-08-02 20:36 ollehar Note Added: 65782
2021-08-03 11:30 DenisChenu Note Added: 65783
2021-08-03 11:36 ollehar Note Added: 65784
2021-08-04 14:48 DenisChenu Note Added: 65813