Fork me on GitHub

Zikula_AbstractInstaller/upgrade and doctrine  Bottom

  • How does doctrine work together with the upgrade function in the Zikula_AbstractInstaller.

    Here the things I want to do:

    1. Add a new table in a new version of a module

    2. Add a new column in already existing table in a new version of a module

    Thank you for your answers

    --
    https://github.com/phaidon/
  • Hi,

    are you talking about Doctrine 1 or 2?

    --
    Guite | ModuleStudio
  • I talk about https://github.com/phaidon/Wikula

    It is Doctrine 1 isn't it?

    By the way do I have to change it to Doctrine 2?

    --
    https://github.com/phaidon/
  • Yes it is Doctrine 1.
    For your upgrade code you can use the methods from DoctrineUtil (see /lib/util/) for adding or dropping columns, indexes and so on. Last do DoctrineUtil::createTablesFromModels('Wikula'); to create the new tables.

    Conversion to Doctrine 2 can be done at any time, but should be treated separately and maybe postponed for another release of the module.

    --
    Guite | ModuleStudio
  • Thanks a lot.

    Doctrine 2 seems for me at the moment not very easy. I will take a look at this later.

    --
    https://github.com/phaidon/
  • Better to get used to Doctrine 2 because Doctrine 1 is not supported anymore upstream and we are moving away from it immediately starting in 1.4. That's why modules should start using it now. The transition is quite easy actually.

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • I thought that Zikula 1.3.0 is a Long Term Support Release.
    Then we should support Doctrine 1 for a long term, right? icon_smile
  • If I recall, we already discussed this. Doctrine 1 was announced as EOL even before we released Zikula 1.3.0 and the official advice has been to start using Doctrine 2. Module developers were explained that it would be better if they do not release D1 modules and if they do, they quickly convert them to D2. DBUtil is based on D1 and we also advice people not to use DBUtil - these are all to be considered legacy components. !.3.0 is an LTS release but we cannot maintain vendor libraries, sorry. That's what the official advice has been to module developers.

    Regards,

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • Thank you for the answer.
    I didn't know that. Or I just could not remember.
  • Thanks for the clarification on D1 and D2 but

    How do I use Doctrine 2 in Zikula-1.3.0?

    I looked at lib/vendor/Doctrine/Doctrine/Core.php and apparently the version is 1.2.3. Do I just replace the Doctrine directory with a copy of Doctrine 2? This doesn't sound right to me since all modules in system/ still have a table.php.
  • Doctrine 2 is included as well (within /plugins/Doctrine/).

    System modules will be converted to D2 in a later version.

    --
    Guite | ModuleStudio
  • Quote

    How do I use Doctrine 2 in Zikula-1.3.0?


    you can take a look at the Tag module which uses D2.
  • 0 users

This list is based on users active over the last 60 minutes.