From 6a387a09a718a8dea534989b2ea2cf2486c20538 Mon Sep 17 00:00:00 2001 From: Manoj K Date: Wed, 10 Sep 2014 18:44:18 +0530 Subject: [PATCH] #29521 - Updated extension key name and install and uninstall mysql script file. --- info.xml | 2 +- sql/install.sql | 47 ++++++++++++++++++++++++++++++++++++++++++++++- sql/uninstall.sql | 4 +++- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/info.xml b/info.xml index e6d4ea8..1ee62f6 100644 --- a/info.xml +++ b/info.xml @@ -1,5 +1,5 @@ - + wci Widget Creation Interface CiviCRM CMS independent Widget Creation Interface. diff --git a/sql/install.sql b/sql/install.sql index 28ca3b9..8cd9b71 100644 --- a/sql/install.sql +++ b/sql/install.sql @@ -1 +1,46 @@ --- Installation mysql script \ No newline at end of file +-- WCI progress bar. +CREATE TABLE IF NOT EXISTS civicrm_wci_progress_bar ( + id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Custom Progress bar Id', + name varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Name of progress bar.', + starting_amount float unsigned NULL COMMENT 'Arbitrary starting amount for progress bar.', + PRIMARY KEY (`id`), + UNIQUE KEY `unique_wci_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- WCI progress bar formula +CREATE TABLE IF NOT EXISTS civicrm_wci_progress_bar_formula ( + id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Formula entry Id', + contribution_page_id int(10) unsigned NOT NULL COMMENT 'Reference contribution page id.', + progress_bar_id int(10) unsigned DEFAULT NULL COMMENT 'Custom Progress bar reference id.', + percentage float unsigned NULL COMMENT 'Percentage amount.', + PRIMARY KEY (`id`), + CONSTRAINT FK_civicrm_wci_progress_bar_formula_progress_bar_id FOREIGN KEY (`progress_bar_id`) REFERENCES `civicrm_wci_progress_bar`(`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; + +-- WCI widget +CREATE TABLE IF NOT EXISTS civicrm_wci_widget ( + id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Widget Id', + title varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title.', + logo_image varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Image url of widget logo image.', + image varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Url of widget image.', + button_title varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Contribute/Donate button title.', + button_link_to int(10) unsigned DEFAULT NULL COMMENT 'Contribution/Donation page reference.', + progress_bar_id int(10) unsigned DEFAULT NULL COMMENT 'Custom Progress bar reference.', + description text DEFAULT NULL COMMENT 'Widget description.', + email_signup_group_id int(10) unsigned DEFAULT NULL COMMENT 'Group reference for email newsletter signup.', + size_variant varchar(25) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget size variant.', + color_title varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title color.', + color_title_background varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title background color.', + color_progress_bar varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Progress bar color.', + color_widget_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title color.', + color_description varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget description color.', + color_border varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget border color.', + color_button varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget button text color.', + color_button_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget button background color.', + style_rules text DEFAULT NULL COMMENT 'Additional style rules.', + override tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Override default template, if 1.', + custom_template text DEFAULT NULL COMMENT 'Widget custom template.', + PRIMARY KEY (`id`), + UNIQUE KEY `unique_wci_title` (`title`), + CONSTRAINT FK_civicrm_wci_widget_progress_bar_id FOREIGN KEY (`progress_bar_id`) REFERENCES `civicrm_wci_progress_bar`(`id`) ON DELETE SET NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; \ No newline at end of file diff --git a/sql/uninstall.sql b/sql/uninstall.sql index 59ac57f..f295770 100644 --- a/sql/uninstall.sql +++ b/sql/uninstall.sql @@ -1 +1,3 @@ --- Un installation mysql script \ No newline at end of file +DROP TABLE IF EXISTS civicrm_wci_widget; +DROP TABLE IF EXISTS civicrm_wci_progress_bar_formula; +DROP TABLE IF EXISTS civicrm_wci_progress_bar; \ No newline at end of file -- 2.25.1