Created
February 17, 2011 22:33
-
-
Save josht/832883 to your computer and use it in GitHub Desktop.
get model path and addPackage, then create the tables and finally alter the table incase an old version was already there
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$modelPath = $modx->getOption('faqman.core_path',null,$modx->getOption('core_path').'components/faqman/').'model/'; | |
$modx->addPackage('faqman',$modelPath); | |
$manager = $modx->getManager(); | |
$manager->createObjectContainer('faqManItem'); | |
$manager->createObjectContainer('faqManSet'); | |
$modx->exec(" | |
ALTER TABLE {$modx->getTableName('faqManItem')} | |
CHANGE `question` | |
`question` TEXT NOT NULL DEFAULT ''; | |
"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment