tumtum / oxid-schema-expander
Library to modify the OXID eShop database. Ideal for OXID modules to have their tables.
Installs: 7 135
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-16 22:01:41 UTC
README
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