Upgrading Aiki

From Aikiframework wiki

Jump to: navigation, search

Use this guide if you want to upgrade an existing Aiki site to the latest version of Aiki Framework.

It is mandatory that you make a back-up of your live site, and create a test database for staging the new Aiki. You should also put your live site into maintenance mode so that you are not collecting new user data in the meantime.

  1. Create a test database. For purposes of demonstration we will call our database 'test'.
  2. Follow the instructions for Installing Aiki and put the new version in a test directory and using your test database.
  3. Visit your test site with a web browser to make sure it is working as expected.
  4. Take this opportunity to make a back up of your live site database.
  5. Copy just your site's custom aiki_widgets into a new table: create table live_widgets select * from aiki_widgets where app_id = '0';
  6. Dump the following tables from your live site: live_widgets aiki_forms aiki_revisions aiki_sites aiki_users
  7. If you have changed the default users groups, also dump: aiki_users_groups
  8. If you have any additional custom tables, dump those as well.
  9. Switch back to your test database.
  10. Import into your test database all the tables you just dumped from your live database.
  11. Insert your custom widgets into the aiki_widgets table:
delete from aiki_widgets where id in (select id from live_widgets);
insert into aiki_widgets select * from live_widgets;
drop table live_widgets;

Finally, run all your tests against the test site. Make sure you already have a back up for your live site. and then you can deploy the new test site to the live site.

Unique usernames

There was a problem in past versions of Aiki of not enforcing unique usernames. You can run this query to see if your site has this problem:

select userid, au.username, email, first_login from aiki_users as au inner join (select username from aiki_users group by username having count(username) > 1) as aug on au.username = aug.username order by username, userid

You should clean up any duplicates you find and then make the username unique:

alter table aiki_users add unique (username);

Extensions

Remember that new Aiki extensions use multiple arguments instead of one argument so you need to modify your extensions yourself.

See Related Pages