tumtum/oxid-schema-expander

There is no license information available for the latest version (v1.0.1) of this package.

Library to modify the OXID eShop database. Ideal for OXID modules to have their tables.

v1.0.1 2021-09-16 14:51 UTC

This package is auto-updated.

Last update: 2024-11-16 22:01:41 UTC


README

Build Status

Library to modify the OXID eShop database. Ideal for OXID modules to have their tables.

The tables will be reviewed and extended or created if necessary.

Example

     public static function onModuleActivation()
     {
         $desire = new DesireExpander();

         // Simple create new table
         $desire
             ->table('tm_example')
                 ->addFieldOxid()
                 ->addFieldOxactive()
                 ->addFieldOxactiveFrom()
                 ->addFieldOxactiveTo()
                 ->addField('OXHASH', "char(32) COLLATE latin1_general_ci NOT NULL DEFAULT '' COMMENT 'Hash'")
                 ->addField('OXTIME', "int(11) NOT NULL COMMENT 'Validation time'")
                 ->addFieldOxtimestamp()
                 ->setPrimaryKey('OXID');

         // Extent a oxarticles table
         $desire
             ->table('oxarticles')
                 ->addField('MYCOLUMN', "char(32) NOT NULL DEFAULT 'Wowo' COMMENT 'Extent only one Column'")
                 ->after('oxlang');

         // A standard oxid-ee table
         $desire
             ->table('tm_example_enterprice')
                 ->addFieldOxid()
                 ->addFieldOxshopid()
                 ->addFieldOxlang()
                 ->addField('OXHASH', "char(32) COLLATE latin1_general_ci NOT NULL DEFAULT '' COMMENT 'Hash'")
                 ->addField('OXTIME', "int(11) NOT NULL COMMENT 'Validation time'")
                 ->addFieldOxtimestamp()
                 ->setPrimaryKey('OXID')
                 ->addKey('FASTFIND', [['OXHASH', 12], 'OXTIME']);

         //Commit all Tables
         $desire->execute();
     }

Changelog

[Unreleased]

v1.0.1 - 2020-03-05

Fixed

  • Possible error removed, if database fetch mode changes in the meantime.

v1.0.0 - 2020-02-23

  • Publishing