Server Updater

Registered by Dan Garner

An updater for Xibo that updates the client database between versions.
This doesn't necessarily have to be done until after the first release - although perhaps we want the version checker code implemented

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Alex Harrington
Definition:
Approved
Series goal:
Accepted for 1.0
Implementation:
Implemented
Milestone target:
milestone icon 1.0.0-rc3
Started by
Alex Harrington
Completed by
Alex Harrington

Whiteboard

I was thinking - the updater will also need to be able to execute PHP snippits.

For example we may need to run some upgrade code on the existing records in the DB that cannot be done using a SQL script.

An example of this will be the changes to the user permissions system. We will need to execute something like

// Get all the existing users
// Create them their own IsUserSpecific group
// Add the LK Record for their existing group
// Etc

Alex: Agreed. I'll come up with a structure, but it'll basically be part of the implementation of any new feature that requires this kind of thing to provide an updater function for the updater to call.

eg:

include('lib/pages/user.class.php);
userUpgrade(1,2);

where userUpgrade(versionFrom, versionTo);

or some such thing.

That could be greatly simplified by supporting only upgrading a single version at a time - eg 1.0.0 --> 1.0.1 ??

Dan:
I dont like the idea of having Upgrade code in the core classes. For the first version of Xibo I did have an XML format that took care of upgrading (and also installing extra modules). It had the ability to copy files into appropriate places and to run more complex logic. An example usage was:
- Copy a file containing some PHP to run into a temp location
- Make an AJAX call to run that PHP
- Report the results
- Delete the temp file if necessary

In this way it could (in theory do automatic updates)

I guess for the updater in this version we would specify a location to store the update XML and a location for the files this update XML would refer to. Which could all be removed once the app was up to date.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.