Fix text in the embed code license
[com.zyxware.civiwci.git] / sql / install.sql
CommitLineData
6a387a09
M
1-- WCI progress bar.
2CREATE TABLE IF NOT EXISTS civicrm_wci_progress_bar (
1720f579 3 id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Custom Progress bar Id.',
6a387a09
M
4 name varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Name of progress bar.',
5 starting_amount float unsigned NULL COMMENT 'Arbitrary starting amount for progress bar.',
10a071d6 6 goal_amount float unsigned NULL COMMENT 'Goal amount for progress bar.',
6a387a09
M
7 PRIMARY KEY (`id`),
8 UNIQUE KEY `unique_wci_name` (`name`)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
10
11-- WCI progress bar formula
12CREATE TABLE IF NOT EXISTS civicrm_wci_progress_bar_formula (
1720f579 13 id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Formula entry Id.',
6a387a09
M
14 contribution_page_id int(10) unsigned NOT NULL COMMENT 'Reference contribution page id.',
15 progress_bar_id int(10) unsigned DEFAULT NULL COMMENT 'Custom Progress bar reference id.',
16 percentage float unsigned NULL COMMENT 'Percentage amount.',
17 PRIMARY KEY (`id`),
18 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
19) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
20
21-- WCI widget
22CREATE TABLE IF NOT EXISTS civicrm_wci_widget (
1720f579 23 id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Widget Id.',
6a387a09
M
24 title varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title.',
25 logo_image varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Image url of widget logo image.',
26 image varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Url of widget image.',
27 button_title varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Contribute/Donate button title.',
28 button_link_to int(10) unsigned DEFAULT NULL COMMENT 'Contribution/Donation page reference.',
29 progress_bar_id int(10) unsigned DEFAULT NULL COMMENT 'Custom Progress bar reference.',
30 description text DEFAULT NULL COMMENT 'Widget description.',
31 email_signup_group_id int(10) unsigned DEFAULT NULL COMMENT 'Group reference for email newsletter signup.',
32 size_variant varchar(25) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget size variant.',
33 color_title varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title color.',
1720f579 34 color_title_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget title background color.',
6a387a09 35 color_progress_bar varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Progress bar color.',
f009fcb1 36 color_progress_bar_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Progress bar background color.',
1720f579 37 color_widget_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget background color.',
6a387a09
M
38 color_description varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget description color.',
39 color_border varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget border color.',
40 color_button varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget button text color.',
41 color_button_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Widget button background color.',
42 style_rules text DEFAULT NULL COMMENT 'Additional style rules.',
43 override tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Override default template, if 1.',
44 custom_template text DEFAULT NULL COMMENT 'Widget custom template.',
6d608c2b
J
45 hide_title tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Hide title, if 1.',
46 hide_border tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Hide widget border, if 1.',
47 hide_pbcap tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Hide pb caption, if 1.',
94f5fffd 48 show_pb_perc tinyint(4) NOT NULL DEFAULT '1' COMMENT 'show pb in %(1) or amt(0)',
c1a7ee1f
J
49 color_btn_newsletter varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter Button text color',
50 color_btn_newsletter_bg varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter Button color',
51 newsletter_text varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter text',
52 color_newsletter_text varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Newsletter text color',
53
6a387a09
M
54 PRIMARY KEY (`id`),
55 UNIQUE KEY `unique_wci_title` (`title`),
fbe9a7d4 56 CONSTRAINT FK_civicrm_wci_widget_progress_bar_id FOREIGN KEY (`progress_bar_id`) REFERENCES `civicrm_wci_progress_bar`(`id`) ON DELETE RESTRICT
6d608c2b 57) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
13e70378
J
58
59-- WCI embed code.
60CREATE TABLE IF NOT EXISTS civicrm_wci_embed_code (
61 id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Custom Progress bar Id.',
62 name varchar(64) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Embed code.',
63 widget_id int(10) unsigned DEFAULT NULL COMMENT 'widget id.',
64 PRIMARY KEY (`id`),
65 UNIQUE KEY `unique_wci_name` (`name`)
66) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
1008246f
J
67
68-- WCI widget cache.
69CREATE TABLE IF NOT EXISTS civicrm_wci_widget_cache (
96beafc6 70 widget_id int(10) unsigned NOT NULL COMMENT 'widget id.',
1008246f 71 widget_code text DEFAULT NULL COMMENT 'Widget code.',
96beafc6
J
72 expire int(10) DEFAULT 0 COMMENT 'A Unix timestamp indicating when the cache entry should expire.',
73 createdtime int(10) DEFAULT 0 COMMENT 'A Unix timestamp indicating create time.',
3ebd2f4b 74 PRIMARY KEY (`widget_id`)
1008246f
J
75
76) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;