Introduction
This is a summary of changes to the CiviCRM database schema between versions 4.5 and 4.6 . It excludes changes to comments, defaults or keys/indexes, in order to provide a compact summary. The intended audience is developers who want to see the main schema changes between major versions. If you are trying to check or fix a Civi database, see Ensuring Schema Integrity on Upgrades.
Method
I grabbed sql/civicrm.mysql from 4.5.0 and from 4.6.0, loaded each into a new database and used mysqldbcompare to compare them. This produced 500 lines of output, which I've summarised below, ignoring changes which just affected comments, defaults or keys/indexes.
New tables
- civicrm_mailing_abtest
- `id` int(10) unsigned AUTO_INCREMENT - PK,
- `name` varchar(128) - 'Name of the A/B test',
- `status` varchar(32) - 'Status',
- `mailing_id_a` int(10) unsigned - 'The first experimental mailing ("A" condition)',
- `mailing_id_b` int(10) unsigned - 'The second experimental mailing ("B" condition)',
- `mailing_id_c` int(10) unsigned - 'The final, general mailing (derived from A or B)',
- `domain_id` int(10) unsigned - 'Which site is this mailing for',
- `testing_criteria` varchar(32),
- `winner_criteria` varchar(32),
- `specific_url` varchar(255) - 'What specific url to track',
- `declare_winning_time` datetime - 'In how much time to declare winner',
- `group_percentage` int(10) unsigned,
- `created_id` int(10) unsigned - 'FK to Contact ID',
- `created_date` datetime - 'When was this item created'. - civicrm_recurring_entity
- `id` int(10) unsigned AUTO_INCREMENT - PK,
- `parent_id` int(10) unsigned - 'Recurring Entity Parent ID',
- `entity_id` int(10) unsigned - 'Recurring Entity Child ID',
- `entity_table` varchar(64) - 'Physical tablename for entity, e.g. civicrm_event',
- `mode` tinyint(4) - '1-this entity, 2-this and the following entities, 3-all the entities'.
Modified tables
- civicrm_action_log
- Added `reference_date` date - 'Stores the date from the entity which triggered this reminder action (e.g. membership.end_date for most membership renewal reminders). - civicrm_action_schedule
- `entity_value` changed from varchar(64) to varchar(255).
- Added `used_for` varchar(64) - 'Used for repeating entity'. - civicrm_contact
- `external_identifier` changed from varchar(32) to varchar(64). - civicrm_contribution
- Added `creditnote_id` varchar(255) - 'unique credit note id, system generated or passed in'.
- Added `tax_amount` decimal(20,2) - 'Total tax amount of this contribution.' - civicrm_contribution_page
- Added `is_billing_required` tinyint(4) - 'if true - billing block is required for online contribution page'. - civicrm_event
- Added `is_billing_required` tinyint(4) - 'if true than billing block is required this event'. - civicrm_line_item
- `qty` changed from int(10) unsigned to decimal(20,2).
- Added `tax_amount` decimal(20,2) DEFAULT NULL COMMENT 'tax of each item'. - civicrm_mailing
- Added `mailing_type` varchar(32) - 'differentiate between standalone mailings, A/B tests, and A/B final-winner'.
- Added `location_type_id` int(10) unsigned - 'With email_selection_method, determines which email address to use' - FK to `civicrm_location_type` (`id`).
- Added `email_selection_method` varchar(20) - 'With location_type_id, determine how to choose the email address to use.' - civicrm_mailing_bounce_type
- name` changed from varchar(8) to varchar(24). - civicrm_mailing_trackable_url
- `url` changed from varchar(255) to text. - civicrm_membership_block
- `membership_types` changed from varchar(255) to varchar(1024). - civicrm_pcp
- Added `is_notify` tinyint(4) - 'Notify owner via email when someone donates to page?'. - civicrm_pcp_block
- Added `owner_notify_id` int(10) unsigned - 'FK to civicrm_option_group with name = PCP owner notifications'.