From dce1468bf8a2a63180bf956971246958fee17309 Mon Sep 17 00:00:00 2001 From: Repellent Date: Fri, 23 Sep 2016 20:34:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20MyS?= =?UTF-8?q?QL=20=D0=BF=D1=80=D0=B8=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=D1=85=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contactsnew/sql.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/contactsnew/sql.php b/contactsnew/sql.php index 76abc31..fc90dfd 100644 --- a/contactsnew/sql.php +++ b/contactsnew/sql.php @@ -5,8 +5,8 @@ * * @package AVE.cms * @subpackage module: ContactsNew - * @since 1.4 - * @author vudaltsov + * @since 1.4 - 1.5 + * @author vudaltsov UPD Repellent * @filesource */ @@ -84,28 +84,28 @@ $module_sql_update[] = " // beta 3 $module_sql_update[] = " ALTER TABLE `CPPREFIX_module_contactsnew_forms` - ADD `code_onsubmit` text NOT NULL + ADD IF NOT EXISTS `code_onsubmit` text NOT NULL AFTER `finish_tpl`"; $module_sql_update[] = " ALTER TABLE `CPPREFIX_module_contactsnew_forms` - ADD `code_onvalidate` text NOT NULL + ADD IF NOT EXISTS `code_onvalidate` text NOT NULL AFTER `code_onsubmit`"; $module_sql_update[] = " ALTER TABLE `CPPREFIX_module_contactsnew_forms` - ADD `code_onsend` text NOT NULL + ADD IF NOT EXISTS `code_onsend` text NOT NULL AFTER `code_onvalidate`"; $module_sql_update[] = " ALTER TABLE `CPPREFIX_module_contactsnew_forms` - DROP INDEX `alias`"; + DROP INDEX IF EXISTS `alias`"; // beta 8 $module_sql_update[] = " 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`"; $module_sql_update[] = " ALTER TABLE `CPPREFIX_module_contactsnew_fields` - DROP `position`"; + DROP IF EXISTS `position`"; // v1.1 beta 1 $module_sql_update[] = " @@ -122,12 +122,12 @@ CREATE TABLE IF NOT EXISTS `CPPREFIX_module_contactsnew_history` ( "; $module_sql_update[] = " 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`"; // v1.1 beta 2 $module_sql_update[] = " ALTER TABLE `CPPREFIX_module_contactsnew_history` - ADD `postdata` text NOT NULL + ADD IF NOT EXISTS`postdata` text NOT NULL AFTER `dialog`"; ?> \ No newline at end of file