Jump to content


Photo

Manual upgrade

upgrade mysql database

  • Please log in to reply
4 replies to this topic

#1 Schoelje

Schoelje

    Member

  • Members
  • PipPip
  • 19 posts
  • LocationNetherlands

Posted 13 August 2013 - 02:21 PM

I read the instructions to upgrade an existing install: http://zurmo.org/upgrades

 

However, for SolydK Back Office I packaged Zurmo (deb).

 

I'd like to know how to upgrade manually.

I know where the files go, how to set the right permissions, and edit the necessary configuration files.

My issue now is that I don't have an sql script to upgrade the MySql database.

 

Use case

User has version 1.5.12, and wants to upgrade to version 2.0.18.

The files are copied (old files overwritten) to /var/www/zurmo, configuration is changed, and permissions are set. An sql script is executed to upgrade the database to the newest version.

 

How can I realize this?

 

 

[EDIT]

Because the database is the only issue during an upgrade, I searched for a database compare method and see if It can be scripted.

This looks promising:

mysqldump --no-data --skip-comments --skip-extended-insert -u root -p zurmo_old>zurmo_old.sql
mysqldump --no-data --skip-comments --skip-extended-insert -u root -p zurmo_new>zurmo_new.sql
diff zurmo_old.sql zurmo_new.sql

Found here: http://stackoverflow...mysql-databases



#2 Stafford

Stafford

    Zurmo Member

  • Moderators
  • 212 posts

Posted 13 August 2013 - 02:47 PM

Can you join the Dev Session today so we can go over your issue? We have Developer Sessions every Tuesday at 10:00AM Chicago Time (http://zurmo.org/for...arning-session/).



#3 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 13 August 2013 - 03:43 PM

1. You would need to upgrade to 2.0.13 using the upgrade script: http://zurmo.org/upgrades
2. Then you could do the manual process to go to 2.0.18. You would have to replace all the application files with the new zip. Then copy the config/ files perInstance.php and debug.php into your new folder. Then, clearCache=1 in the browser and then run updateSchema in the command line.


Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#4 Schoelje

Schoelje

    Member

  • Members
  • PipPip
  • 19 posts
  • LocationNetherlands

Posted 13 August 2013 - 05:46 PM

1. You would need to upgrade to 2.0.13 using the upgrade script: http://zurmo.org/upgrades
2. Then you could do the manual process to go to 2.0.18. You would have to replace all the application files with the new zip. Then copy the config/ files perInstance.php and debug.php into your new folder. Then, clearCache=1 in the browser and then run updateSchema in the command line.


Thanks for your quick reply.
That's another approach.
I could run php scripts from command, so in theory dpkg should be able to run the script post-install:

php -f zurmoc.php updateSchema zurmo

Is that correct?

I suppose for the database update I need these files:

filesToUpload/app/protected/commands/UpdateSchemaCommand.php
filesToUpload/app/protected/commands/bootstrap.php
filesToUpload/app/protected/commands/zurmoc.php

am I missing some (I probably do, but I'd like to keep it as clean as possible)?

Also:
What does "clearCache=1" do?
Can you achieve the same thing with a command (dpkg cannot open a browser)?



#5 Schoelje

Schoelje

    Member

  • Members
  • PipPip
  • 19 posts
  • LocationNetherlands

Posted 20 August 2013 - 05:17 PM

To prevent cross-posting, I succeeded in creating a Debian package: http://zurmo.org/for...alts/#entry8139







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users