You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
<?php |
|
|
|
/** |
|
* AVE.cms - Fix Errors |
|
* |
|
* @package AVE.cms |
|
* @subpackage modules/workdocs |
|
* @filesource |
|
*/ |
|
|
|
$module_sql_install = []; |
|
$module_sql_deinstall = []; |
|
$module_sql_update = []; |
|
|
|
//-- Deinstall module ---------------------------------------------------------------------- |
|
|
|
$module_sql_deinstall[] = "DROP TABLE IF EXISTS %%PRFX%%_module_workdocs;"; |
|
$module_sql_deinstall[] = "DROP TABLE IF EXISTS %%PRFX%%_module_workdocs_logs;"; |
|
|
|
//-- Install module ------------------------------------------------------------------------ |
|
|
|
$module_sql_install[] = "CREATE TABLE IF NOT EXISTS `%%PRFX%%_module_workdocs` ( |
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, |
|
`title` varchar(255) DEFAULT NULL, |
|
`description` varchar(500) DEFAULT NULL, |
|
`rubric_id` int(3) DEFAULT NULL, |
|
`save_enable` enum('0','1') DEFAULT '0', |
|
`code_enable` enum('0','1') DEFAULT '0', |
|
`revisions_enable` enum('0','1') DEFAULT '0', |
|
`logs_enable` enum('0','1') DEFAULT '0', |
|
`type` enum('file','system') DEFAULT 'system', |
|
`self_sql` text, |
|
`code_before` longtext, |
|
`code_after` longtext, |
|
`last_run` int(11) unsigned NOT NULL, |
|
`last_count` int(11) unsigned NOT NULL DEFAULT '0', |
|
PRIMARY KEY (`id`) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; |
|
"; |
|
|
|
$module_sql_install[] = "CREATE TABLE IF NOT EXISTS `%%PRFX%%_module_workdocs_logs` ( |
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, |
|
`work_id` int(3) DEFAULT NULL, |
|
`rubric_id` int(3) DEFAULT NULL, |
|
`document_id` int(11) DEFAULT NULL, |
|
`document_title` varchar(255) DEFAULT NULL, |
|
`last_run` int(11) DEFAULT NULL, |
|
`logs` text, |
|
PRIMARY KEY (`id`) |
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; |
|
"; |
|
|
|
//-- Update module ------------------------------------------------------------------------- |
|
|
|
$module_sql_update[] = " |
|
UPDATE |
|
`%%PRFX%%_module` |
|
SET |
|
ModuleAveTag = '" . $module['ModuleAveTag'] . "', |
|
ModulePHPTag = '" . $module['ModulePHPTag'] . "', |
|
ModuleVersion = '" . $module['ModuleVersion'] . "' |
|
WHERE |
|
ModuleSysName = '" . $module['ModuleSysName'] . "' |
|
LIMIT 1; |
|
"; |