-- +--------------------------------------------------------------------+
--- | CiviCRM version 3.2 |
+-- | CiviCRM version 4.6 |
-- +--------------------------------------------------------------------+
--- | Copyright CiviCRM LLC (c) 2004-2010 |
+-- | Copyright CiviCRM LLC (c) 2004-2015 |
-- +--------------------------------------------------------------------+
-- | This file is a part of CiviCRM. |
-- | |
fulfilled_date date COMMENT 'Optional. Can be used to record the date this product was fulfilled or shipped.',
start_date date COMMENT 'Actual start date for a time-delimited premium (subscription, service or membership)',
end_date date COMMENT 'Actual end date for a time-delimited premium (subscription, service or membership)',
- comment text
+ comment text
,
PRIMARY KEY ( id )
-,
+,
FOREIGN KEY (contribution_id) REFERENCES civicrm_contribution(id)
-
+
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
failure_count int unsigned DEFAULT 0 COMMENT 'Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.',
failure_retry_date date COMMENT 'At Groundspring we set a business rule to retry failed payments every 7 days - and stored the next scheduled attempt date there.',
processor_id varchar(255) COMMENT 'Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??',
- auto_renew tinyint NOT NULL DEFAULT 0 COMMENT 'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.'
+ auto_renew tinyint NOT NULL DEFAULT 0 COMMENT 'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.'
,
PRIMARY KEY ( id )
-,
+,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
+
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-- *
-- * civicrm_premiums
-- *
--- * table - settings for the Premiums features for a given contribution page
+-- * table - settings for the Premiums features for a given contribution page
-- *
-- *******************************************************/
CREATE TABLE civicrm_premiums (
premiums_intro_text text COMMENT 'Displayed in <div > at top of Premiums section of page. Text and html allowed.',
premiums_contact_email varchar(100) COMMENT 'This email address is included in receipts if it is populated and a premium has been selected.',
premiums_contact_phone varchar(50) COMMENT 'This phone number is included in receipts if it is populated and a premium has been selected.',
- premiums_display_min_contribution tinyint NOT NULL COMMENT 'Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.'
+ premiums_display_min_contribution tinyint NOT NULL COMMENT 'Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.'
,
PRIMARY KEY ( id )
-
+
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-- *
-- * civicrm_product
-- *
--- * able - stores "product info" for premiums and can be used for non-incentive products
+-- * able - stores "product info" for premiums and can be used for non-incentive products
-- *
-- *******************************************************/
CREATE TABLE civicrm_product (
duration_unit enum('day', 'month', 'week', 'year') DEFAULT 'year' ,
duration_interval int COMMENT 'Number of units for total duration of subscription, service, membership (e.g. 12 Months).',
frequency_unit enum('day', 'month', 'week', 'year') DEFAULT 'month' COMMENT 'Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.',
- frequency_interval int COMMENT 'Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).'
+ frequency_interval int COMMENT 'Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).'
,
PRIMARY KEY ( id )
-,
+,
FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id)
-
+
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Contribution ID',
premiums_id int unsigned NOT NULL COMMENT 'Foreign key to premiums settings record.',
product_id int unsigned NOT NULL COMMENT 'Foreign key to each product object.',
- sort_position int unsigned NOT NULL
+ sort_position int unsigned NOT NULL
,
PRIMARY KEY ( id )
-,
+,
FOREIGN KEY (premiums_id) REFERENCES civicrm_premiums(id)
-,
+,
FOREIGN KEY (product_id) REFERENCES civicrm_product(id)
-
+
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
id int unsigned NOT NULL AUTO_INCREMENT COMMENT 'SMS History ID',
message text COMMENT 'Contents of the SMS.',
contact_id int unsigned NOT NULL COMMENT 'FK to Contact who is sending this SMS',
- sent_date date COMMENT 'When was this SMS sent'
+ sent_date date COMMENT 'When was this SMS sent'
,
PRIMARY KEY ( id )
-,
+,
FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id)
-
+
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-- * Modify the civicrm_contribution Table Structure
-- *
-- *******************************************************/
-
+
ALTER TABLE `civicrm_contribution` ADD `solicitor_id` int unsigned COMMENT 'FK to Solicitor ID';
-
+
ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (`solicitor_id`) REFERENCES `civicrm_contact` (`id`);
ALTER TABLE `civicrm_contribution` ADD note text COMMENT 'Note and/or Comment.';
- ALTER TABLE `civicrm_contribution` ADD recur_contribution_id int unsigned COMMENT 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.';
-
+ ALTER TABLE `civicrm_contribution` ADD recur_contribution_id int unsigned COMMENT 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.';
+
ALTER TABLE `civicrm_contribution` ADD CONSTRAINT FOREIGN KEY (recur_contribution_id) REFERENCES civicrm_contribution_recur(id);
-- *
-- *******************************************************/
- ALTER TABLE `civicrm_contribution_page` ADD footer_text text COMMENT 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.';
+ ALTER TABLE `civicrm_contribution_page` ADD footer_text text COMMENT 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.';
-- /*******************************************************
-- * Modify the civicrm_custom_field Table Structure
-- *
-- *******************************************************/
-
+
ALTER TABLE `civicrm_custom_field` ADD is_search_range tinyint DEFAULT 0 COMMENT 'Is this property range searchable.';
ALTER TABLE `civicrm_custom_field` ADD start_date_years int unsigned COMMENT 'Date may be up to start_date_years years prior to tcurrent date ';
ALTER TABLE `civicrm_custom_field` ADD end_date_years int unsigned COMMENT 'Date may be up to end_date_years years after to tcurrent date ';
ALTER TABLE `civicrm_custom_field` ADD date_parts varchar(255) COMMENT 'which date part included in display ';
ALTER TABLE `civicrm_custom_field` ADD note_columns int unsigned COMMENT ' Number of columns in Note Field ';
- ALTER TABLE `civicrm_custom_field` ADD note_rows int unsigned COMMENT ' Number of rows in Note Field ';
+ ALTER TABLE `civicrm_custom_field` ADD note_rows int unsigned COMMENT ' Number of rows in Note Field ';
-- /*******************************************************
ALTER TABLE `civicrm_location` ADD name varchar(255);
-
+
-- /*******************************************************
-- *
-- * Modify the civicrm_uf_field Table Structure
ALTER TABLE `civicrm_uf_field` ADD label varchar(255) COMMENT 'To save label for fields.';
ALTER TABLE `civicrm_uf_field` ADD field_type varchar(255) COMMENT 'This field saves field type (ie individual,household.. field etc).';
-
+
-- /*******************************************************
-- *
-- * Modify the civicrm_uf_group Table Structure
-- *
-- *******************************************************/
-
+
ALTER TABLE `civicrm_uf_group` ADD limit_listings_group_id int unsigned COMMENT 'Group id, foriegn key from civicrm_group';
- ALTER TABLE `civicrm_uf_group` ADD CONSTRAINT FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
+ ALTER TABLE `civicrm_uf_group` ADD CONSTRAINT FOREIGN KEY (limit_listings_group_id) REFERENCES civicrm_group(id);
ALTER TABLE `civicrm_uf_group` ADD post_URL varchar(255) COMMENT 'Redirect to URL.';
-- * Drop Old Tables
-- *
-- *******************************************************/
-
+
DROP TABLE IF EXISTS civicrm_module_profile;