Booktype 1.6.1 to 2.x upgrade
  • Hi,

    I've checked the Booktype dev and Booktype 2.4 for Authors and Publishers documents, but there's no clear information on how to upgrade from Booktype 1.6.1 to the 2.x branch. Is the chapter on manual upgrade right (https://sourcefabric.booktype.pro/booktype-24-for-authors-and-publishers/manual-upgrade-on-gnulinux/), or do I need some extra steps due to the huge code difference between the two versions.

    Thanks in advance!
    --
    Nicolas
  • 6 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Nicolas,

    That is a good question, we have not attempted an upgrade of this many versions for a while. I would recommend that you keep a backup of your Booktype 1.6.x system and maybe clone it to a test system before upgrading your production system.

    Please let us know how you get on, as we would like to add documentation for any issues that you experience.

    Cheers!

    Daniel
  • Thanks Daniel!

    > I would recommend that you keep a backup of your Booktype 1.6.x system
    and maybe clone it to a test system before upgrading your production
    system.

    That's my plan. I'll let you know about how it works (or doesn't...). I'm pretty sure there are still some old 1.6.1 versions here and there that could use our feedback.

    Regards,
    Nicolas
  • I'm currently testing Booktype1.6 to 2.x migration, and it's not straightforward at all. The aforementioned document seems good, but I also have to deal with Django versions because BT16 required Django 1.3, and I have installed BT2x with Django 1.9...
    I feel it's going to take some extra steps...
  • I managed to run the first step by using the following command before (column removed in Django 1.8): ALTER TABLE django_content_type DROP COLUMN name

    So now ./manage.py migrate --fake-initial doesn't return any error, but the following step, ./manage.py update_permissions, fails with the following error message:

    django.db.utils.ProgrammingError: ERREUR:  la relation « core_permission » n'existe pas
    LINE 1: ...ion"."name", "core_permission"."description" FROM "core_perm...
                                                                 ^


  • Also replaced the DB Engine in the configuration file by django.db.backend.postgresql (no more psycopg2).
  • Checking the database shows that it is missing some tables (including core_permission). So updating permissions on a table that doesn't exist is a bit difficult. I guess the migration didn't work as expected.

    Note that I first installed the application with sqlite, and then pointed the database settings to a copy of the old BT1.6 database (postgresql). Maybe it wasn't a good idea, but I see no alternative.
    Post edited by Nicolas Dufour at 2018-10-18 10:14:55