When Upgrading from 0.8.6 to 0.8.8

Tagged:  

Hi,

I have a question about the instructions in upgrade.txt (from 0.8.8). When it says, "1) Install 0.8.8 in another directory than 0.8.6"

Am I to "install" 0.8.8 or did it mean to "upload" the files and folders of 0.8.8 in it's own directory?

The term "install" is a bit confusing here, since it already imply the complete process of uploading the files and running the installer script to configure PP and load up the tables to the database.

I have tried to rephrase the upgrade instructions. Are they more clear now? Thanks!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upgrading to ProjectPier 0.8.8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ProjectPier 0.8.8 is NOT database compatible with previous versions.

Upgrade instructions

1) After downloading, unzip 0.8.8 in a location different from 0.8.6
2) Make a copy of your 0.8.6 database
3) Append 086 to the name of the 0.8.6 root directories mentioned in appendix A
4) Copy/Upload the 0.8.8 root directories mentioned in appendix A to your 0.8.6 root
5) Run the upgrade script from the browser <086 root>/public/patch/patch.php?id=086-088
6) Monitor the output of the upgrade script

In case the upgrade script stops with a FAIL message:
a) remove all the lines including the line that gave a FAIL message from /public/patch/086-088.sql
b) rerun the script from the browser

In case the browser shows a white page:
a) remove all the lines including the line that gave a white page
b) rerun the script from the browser

Note: Some commands may take longer to complete than the browser is willing to wait (time out).
The command is still executed but we need to rerun the script without the command.

7) Copy /public086/files to /public/files (overwrite all)
8) Create a new directory tmp in the 0.8.6 root
9) Login. All should work fine now. Force a browser reload to reload all stylesheets.

Fallback instructions

1) Delete the directories mentioned in appendix A
2) Remove 086 from the name of the directories mentioned in appendix A
3) Restore your database

Appendix A. Upgrade directories

  application
  environment
  language
  library
  public
  tools

Hi phpfreak,

You could say:

1: After downloading, unzip files to your hard drive and then upload the "pp088" folder to somewhere on your web server. Do not place in your version 0.8.6 folder.

I'm usually pretty good at this, but it's almost 4am here now.. I will think more on it and make another suggestion when i get up later.

Ok.. take a look at this to see if it's straight forward enough.

1) Unzip the ProjectPier v0.8.8 package to your hard drive. Be sure you are able to locate the pp088 folder you just unzipped.
2) Make a backup of your 0.8.6 database before you begin making any changes.
3) Append 086 to the 0.8.6 core folders mentioned in appendix A
4) Upload the 0.8.8 core folders mentioned in appendix A to your the 0.8.6 root on your web server.
5) Run the upgrade script from the browser http://YOUR-PP-WEBSITE.COM/public/patch/patch.php?id=086-088. Replace "YOUR-PP-WEBSITE.COM" with your own domain name.
6) Monitor the output of the upgrade script

BTW, for step 4, should the files in the 0.8.8 root be included with the uploading/copying to the 0.8.6 folder? Or is it only those core folders mentioned in Appendix A?

Tomorrow I will look through the rest.

Copied to new upgrade.txt. BTW you are right, also the files in the 0.8.8 root should be copied.

To the best of my knowledge I've followed the upgrade instructions to the letter. But I receive the following error:

Error
We are sorry, but a fatal error prevented ProjectPier from executing your request. An Error Report has been sent to the administrator.

As for a rewrite on the upgrade instructions... here's another version of (1 through 5) for consideration

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upgrading to ProjectPier 0.8.8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ProjectPier 0.8.8 is NOT database compatible with previous versions. This means that you will need to perform an upgrade not only to the files presently on your server but your database as well. It is HIGHLY suggested that you create a back up of your current files and database prior to upgrading to the latest version of ProjectPier.

Upgrade Instructions:

Step 1)
Create a new directory on your server similar to your current 0.8.6 ProjectPier installation. (IE. Current Installation: /myprojectdir New Installation: /myprojectdir2) Do not install / unpackage the contents of this zip into your current installation directory.

Step 2)
Make a copy of your current 0.8.6 database

Step 3)
Review the list of directories/folders as provided in Appendix A at the bottom of this file. Rename each of these folders/directories inside your current 0.8.6 installation to include, 0.8.6. (For example: Rename "application" to
"application_0.8.6" and "public" to "public_0.8.6")

Step 4)
Copy all of the directories / folders provided in Appendix A at the bottom of this file to the root of your current 0.8.6 installation.

Step 5)
Copy and paste the following URL into your web browser:
http://YOUR-SITE.com/086installation/public/patch.php?id=086-088

NOTE: "YOUR-SITE.COM/086installation/" must be changed to correspond to your server address and the installation folder of your current 0.8.6 installation.

**************************************************************************************************************************************

anyone have any clearer instructions from #6 forward if possible?

I like the idea that you give examples in the instruction. It really makes a difference. Here's my improvements to your suggestion.

Step 1)
Create a new directory on your server similar to your current 0.8.6 ProjectPier installation.

EXAMPLE:
        - Your current Installation folder: /myprojectdir
        - Create New folder for the 0.8.8 files and folders: /myprojectdir2

Do not install / unpackage the contents of this zip into your current installation directory.

Step 2)
Make a backup of your current 0.8.6 database tables.

Step 3)
Review the list of folders as provided in Appendix A at the bottom of this file. Locate these folders and rename each of them in your current 0.8.6 installation to append 086.

EXAMPLE: Rename "application" to "application_086",  "public" to "public_086" and so on.

Step 4)
Copy over all of the folders listed in Appendix A (below) and all the files (root) from your 0.8.8 folder  to the root of your current 0.8.6 installation.

NOTE: This will overwrite some of the files in the 0.8.6 installation folder, but should not overwrite any of the folders listed in Appendix A.

Step 5)
Copy and paste the following URL into your web browser:
http://YOUR-SITE.com/086installation/public/patch.php?id=086-088

NOTE: "YOUR-SITE.COM/086installation/" must be changed to correspond to your server address and the installation folder of your current 0.8.6 installation.

This will update the database tables to 0.8.8. You should monitor the upgrade process for errors.

I think this should workout great. I noticed in "Appendix A" that the "tmp" folder is missing for the list. Other than that, everything else was clear enough.

I wanted to mention also that I didn't use the script to update my database tables. I did it manually via phpMyAdmin. You have to make sure to change ALL the {$tp} to your db table prefix and remove all the updates for plugins that you don't have activated.

I didn't have ticket activated, so I removed all the lines that updates that table. Otherwise you will get an error.

Tried everything at this point and going to give up as I've spent entirely to long attempting to get this to work. Sucks because, the new version is nice. Wish I didn't have some much data in the .8.6 install or I'd just suffer through manually moving the data.

Anyone else getting a "Fatal Error"? If so, any fixes? Ideas?

Is your site online? I am willing to help out when I can reach the site via the Internet.

Hey freak / All,

First thanks for the offer to help but my instances are all local to my office enviornment.

I finally got the installation working. Long and short, I wasn't really clear on the .SQL file and how to adjust based failed updates/inserts etc. The instructions from #6 forward could probably use a little love ;)

Suggestion which I realize is very time consuming would be to update the upgrade file to report any failure and allow the user to "Run Again" and ignore the previous error.

I've now successfully upgraded two seperate instances, one for testing and one for operations. On the second upgrade it's important to note for those who have plugins enabled, I found that temporarily disabling these and then running the upgrade greatly reduce the number of modfications required to the .SQL file.


Suggestion which I realize is very time consuming would be to update the upgrade file to report any failure and allow the user to "Run Again" and ignore the previous error.

I have a partial solution programmed but it needs some polishing ;-) Basically, it runs the script, errors are examined for being real errors or because of missing tables (plugin inactive) and then at the end reported. Should reduce the issues to zero in my opinion.

Hi phpfreak,

Excellent news on the upgrade script you're working on.

What do you think about a function that loops through the database for installed plugins first. It could remove the table updates for the tables that are not present from the SQL update file. This along with your error handling solution should ensure 0 error.

Just a thought. :)

Good work you got it working.

Hi phpfreak,

Ok.. I've made an amendment to include the files in the 0.8.8 root.

1) Unzip the ProjectPier v0.8.8 package to your hard drive. Be sure you are able to locate the pp088 folder you just unzipped.
2) Make a backup of your 0.8.6 database before you begin making any changes.
3) Append 086 to the 0.8.6 core folders mentioned in appendix A
4) Upload the all the 0.8.8 files and only the core folders mentioned in appendix A to your the 0.8.6 root on your web server. The files in the root may be overwritten, but none of the core folders should require overwriting.
5) Run the upgrade script from the browser http://YOUR-PP-WEBSITE.COM/public/patch/patch.php?id=086-088. Replace "YOUR-PP-WEBSITE.COM" with your own domain name.
6) Monitor the output of the upgrade script

BTW, I trying up grading, but it seems there are something missing from the 086-088.sql file.

I understand that there are some table adjustments included that may not have been in the 0.8.6 database. Those will throw an error, but the work-around you gave in the upgrade.txt can help with that.

The big problem is with the users and contacts tables. It seems that script supposed to alter the "users" table so it would match the newly created "contacts" table. Then it copies over all the data from "users" to "contacts". The same for the "user_im_values" table to be adjust and copied over to "contact_im_values".

It seems there still some differences. According to the error MySQL throws, some of the requested fields don't match. This is where the error is coming from.

INSERT INTO `{$tp}contacts`  (
  `id`,
  `company_id`,
  `user_id`,
  `email`,
  `display_name`,
  `title`,
  `avatar_file`,
  `use_gravatar`,
  `is_favorite`,
  `timezone`,
  `office_number`,
  `fax_number`,
  `mobile_number`,
  `home_number`,
  `created_on`,
  `created_by_id`,
  `updated_on`,
  `updated_by_id`
)
SELECT
  `id`,
  `company_id`,
  `id`,
  `email`,
  `display_name`,
  `title`,
  `avatar_file`,
  `use_gravatar`,
  0,
  `timezone`,
  `office_number`,
  `fax_number`,
  `mobile_number`,
  `home_number`,
  `created_on`,
  `created_by_id`,
  `updated_on`,
  `created_by_id`
FROM `{$tp}users`;

I'm going to try the upgrade again shortly from scratch. Only this time I will remove all the tables I know I don't have from the 086-088.sql file.

Ok.. Upgrading went fine this time. I didn't have some of the plugins activated before, but all the database adjustments ran fine (once the deactivated tables adjustments from the sql file was taken out).

There is a database error when I tried to activate tickets afterwards though. I'll check out this some more and will create new post for it later.

SP2

Solved in SP2 this database error

Thanks a lot. I'm going to install it now.