Skip to content

How to upgrade between 0.1 & 0.2 ?

tawfekov edited this page Apr 9, 2013 · 1 revision

How to upgrade between 0.1 & 0.2 ?

I have provided you with simple Console controller , and I would ask you to do some manual work to complete this command line tool :

1- backup your database . 2- update the revsions table to replace all anonymous revisions to some user you might choose , since this module doesn't support anonymous auditing in 0.2 , you may go back to version 0.1 if you need to have anonymous auditing .

3- open vendors/tawfekov/zf2entityaudit/src/ZF2EntityAudit/Controllers/ConsoleController.php and replace the entity name on line 38 with your ZFC user entity Class name , in my case i was using custom class name as you might see .

4- php public/index.php will output overview informations like :

Zend Framework 2.1.4 application

Usage:

index.php update update the database from 0.1 to be 0.2 compatibale

5- to run the update tool you need to run this command php public/index.php update it will display some notes , sleep for 30 seconds and start updating . 6- you will see some log showing in the screens , its just for debugging . 7- at the end you'll some manual tasks you must do it

now its time to manually rename the username field to be user_id and change its type to be int

after doing so , simply you need to run a doctrine2 cli command

./vendor/bin/doctrine-module orm:schema-tool:update --dump-sql

./vendor/bin/doctrine-module orm:schema-tool:update --force' to execute some sql

then you should be able to work as before

8- make sure to delete you caches to ensure using the new & fresh updates

9- if you need any help , please don't be shy & submit a bug or a question , I will answer it asap .

Clone this wiki locally