← Back to team overview

phpdevshell team mailing list archive

Re: [Question #210689]: Is there a more detailed tutorial for how to use the upgrade feature of a plugin

 

Question #210689 on PHPDevShell changed:
https://answers.launchpad.net/phpdevshell/+question/210689

    Status: Answered => Open

tad is still having a problem:
That does make sense, however I'm still lost on how the plugin config
file should look on the version that is being downloaded for the
upgrade. Also when an upgrade occurs does it replace all the files in
the directory with the new files downloaded?

One thing I'm confused about is I don't understand what version is the
database one and what version is the software one as there is only one
update tag.

Now lets say(to help make things make sense in my head) this is what the plugin file looks like for the database version:
<version>1</version> <-- Just for looks, can be whatever I want

<versionurl current=1>http://blah.com/update.xml</versionurl>  <-- Used to check if the current is < the new version
<install version=1>
<-- all the basic install stuff here installed when you install the plugin
</install>

<upgrade version=1>
<-- all the stuff done when upgrade "1" is executed..
</upgrade>


My question would be how does it know when to execute the "upgrade
version=1"?

And can you have multiple versions of <install>? If so what is the
purpose of the install tags vs the upgrade tags?

I might be narrow minded so forgive me but the only logical way for this to work in my head would be something along the lines of:
if versionurl is < upgrade version
run <upgrade> tags that are > the versionurl
then after the upgrade change the versionurl to the last <upgrade> version it completed

I'm sure that's all completely wrong but it is the only way I can see it
working.

Again sorry for the confusion, I'm just  very new to using any type of
"shell".

-- 
You received this question notification because you are a member of
PHPDevShell, which is an answer contact for PHPDevShell.