Skip to content

Instantly share code, notes, and snippets.

@josht
Created February 17, 2011 22:33
Show Gist options
  • Save josht/832883 to your computer and use it in GitHub Desktop.
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
$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