Browse Source

Исправлены ошибки MySQL при обновлениях модуля

master
Repellent 8 years ago
parent
commit
dce1468bf8
  1. 20
      contactsnew/sql.php

20
contactsnew/sql.php

@ -5,8 +5,8 @@
* *
* @package AVE.cms * @package AVE.cms
* @subpackage module: ContactsNew * @subpackage module: ContactsNew
* @since 1.4 * @since 1.4 - 1.5
* @author vudaltsov * @author vudaltsov UPD Repellent
* @filesource * @filesource
*/ */
@ -84,28 +84,28 @@ $module_sql_update[] = "
// beta 3 // beta 3
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_forms` ALTER TABLE `CPPREFIX_module_contactsnew_forms`
ADD `code_onsubmit` text NOT NULL ADD IF NOT EXISTS `code_onsubmit` text NOT NULL
AFTER `finish_tpl`"; AFTER `finish_tpl`";
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_forms` ALTER TABLE `CPPREFIX_module_contactsnew_forms`
ADD `code_onvalidate` text NOT NULL ADD IF NOT EXISTS `code_onvalidate` text NOT NULL
AFTER `code_onsubmit`"; AFTER `code_onsubmit`";
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_forms` ALTER TABLE `CPPREFIX_module_contactsnew_forms`
ADD `code_onsend` text NOT NULL ADD IF NOT EXISTS `code_onsend` text NOT NULL
AFTER `code_onvalidate`"; AFTER `code_onvalidate`";
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_forms` ALTER TABLE `CPPREFIX_module_contactsnew_forms`
DROP INDEX `alias`"; DROP INDEX IF EXISTS `alias`";
// beta 8 // beta 8
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_fields` ALTER TABLE `CPPREFIX_module_contactsnew_fields`
ADD `active` enum('0','1') NOT NULL DEFAULT '1' ADD IF NOT EXISTS `active` enum('0','1') NOT NULL DEFAULT '1'
AFTER `form_id`"; AFTER `form_id`";
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_fields` ALTER TABLE `CPPREFIX_module_contactsnew_fields`
DROP `position`"; DROP IF EXISTS `position`";
// v1.1 beta 1 // v1.1 beta 1
$module_sql_update[] = " $module_sql_update[] = "
@ -122,12 +122,12 @@ CREATE TABLE IF NOT EXISTS `CPPREFIX_module_contactsnew_history` (
"; ";
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_forms` ALTER TABLE `CPPREFIX_module_contactsnew_forms`
ADD `protection` enum('0','1') NOT NULL DEFAULT '1' ADD IF NOT EXISTS `protection` enum('0','1') NOT NULL DEFAULT '1'
AFTER `title`"; AFTER `title`";
// v1.1 beta 2 // v1.1 beta 2
$module_sql_update[] = " $module_sql_update[] = "
ALTER TABLE `CPPREFIX_module_contactsnew_history` ALTER TABLE `CPPREFIX_module_contactsnew_history`
ADD `postdata` text NOT NULL ADD IF NOT EXISTS`postdata` text NOT NULL
AFTER `dialog`"; AFTER `dialog`";
?> ?>
Loading…
Cancel
Save