(REF) civicrm_data - Extract civicrm_action_mapping, civicrm_contact_type, etal
authorTim Otten <totten@civicrm.org>
Fri, 19 May 2023 06:41:30 +0000 (23:41 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 19 May 2023 08:30:39 +0000 (01:30 -0700)
Also: civicrm_county, civicrm_participant_status_type, civicrm_uf_field,
civicrm_uf_group, civicrm_uf_join

sql/civicrm_data/civicrm_action_mapping.sqldata.php [new file with mode: 0644]
sql/civicrm_data/civicrm_contact_type.sqldata.php [new file with mode: 0644]
sql/civicrm_data/civicrm_county.sqldata.php [new file with mode: 0644]
sql/civicrm_data/civicrm_participant_status_type.sqldata.php [new file with mode: 0644]
sql/civicrm_data/civicrm_uf_field.sqldata.php [new file with mode: 0644]
sql/civicrm_data/civicrm_uf_group.sqldata.php [new file with mode: 0644]
sql/civicrm_data/civicrm_uf_join.sqldata.php [new file with mode: 0644]
xml/templates/civicrm_data.tpl

diff --git a/sql/civicrm_data/civicrm_action_mapping.sqldata.php b/sql/civicrm_data/civicrm_action_mapping.sqldata.php
new file mode 100644 (file)
index 0000000..c9346ea
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+// CRM-8150
+return CRM_Core_CodeGen_SqlData::create('civicrm_action_mapping')
+  ->addValues([
+    [
+      'entity' => 'civicrm_activity',
+      'entity_value' => 'activity_type',
+      'entity_value_label' => 'Activity Type',
+      'entity_status' => 'activity_status',
+      'entity_status_label' => 'Activity Status',
+      'entity_date_start' => 'activity_date_time',
+      'entity_date_end' => NULL,
+      'entity_recipient' => 'activity_contacts',
+    ],
+    [
+      'entity' => 'civicrm_participant',
+      'entity_value' => 'event_type',
+      'entity_value_label' => 'Event Type',
+      'entity_status' => 'civicrm_participant_status_type',
+      'entity_status_label' => 'Participant Status',
+      'entity_date_start' => 'event_start_date',
+      'entity_date_end' => 'event_end_date',
+      'entity_recipient' => 'event_contacts',
+    ],
+    [
+      'entity' => 'civicrm_participant',
+      'entity_value' => 'civicrm_event',
+      'entity_value_label' => 'Event Name',
+      'entity_status' => 'civicrm_participant_status_type',
+      'entity_status_label' => 'Participant Status',
+      'entity_date_start' => 'event_start_date',
+      'entity_date_end' => 'event_end_date',
+      'entity_recipient' => 'event_contacts',
+    ],
+    [
+      'entity' => 'civicrm_membership',
+      'entity_value' => 'civicrm_membership_type',
+      'entity_value_label' => 'Membership Type',
+      'entity_status' => 'auto_renew_options',
+      'entity_status_label' => 'Auto Renew Options',
+      'entity_date_start' => 'membership_join_date',
+      'entity_date_end' => 'membership_end_date',
+      'entity_recipient' => NULL,
+    ],
+    [
+      'entity' => 'civicrm_participant',
+      'entity_value' => 'event_template',
+      'entity_value_label' => 'Event Template',
+      'entity_status' => 'civicrm_participant_status_type',
+      'entity_status_label' => 'Participant Status',
+      'entity_date_start' => 'event_start_date',
+      'entity_date_end' => 'event_end_date',
+      'entity_recipient' => 'event_contacts',
+    ],
+    [
+      'entity' => 'civicrm_contact',
+      'entity_value' => 'civicrm_contact',
+      'entity_value_label' => 'Date Field',
+      'entity_status' => 'contact_date_reminder_options',
+      'entity_status_label' => 'Annual Options',
+      'entity_date_start' => 'date_field',
+      'entity_date_end' => NULL,
+      'entity_recipient' => NULL,
+    ],
+  ]);
diff --git a/sql/civicrm_data/civicrm_contact_type.sqldata.php b/sql/civicrm_data/civicrm_contact_type.sqldata.php
new file mode 100644 (file)
index 0000000..09d2b58
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+return CRM_Core_CodeGen_SqlData::create('civicrm_contact_type')
+  ->addValues([
+    [
+      'id' => 1,
+      'name' => 'Individual',
+      'label' => ts('Individual'),
+      'image_URL' => NULL,
+      'parent_id' => NULL,
+      'is_active' => 1,
+      'is_reserved' => 1,
+      'icon' => 'fa-user',
+    ],
+    [
+      'id' => 2,
+      'name' => 'Household',
+      'label' => ts('Household'),
+      'image_URL' => NULL,
+      'parent_id' => NULL,
+      'is_active' => 1,
+      'is_reserved' => 1,
+      'icon' => 'fa-home',
+    ],
+    [
+      'id' => 3,
+      'name' => 'Organization',
+      'label' => ts('Organization'),
+      'image_URL' => NULL,
+      'parent_id' => NULL,
+      'is_active' => 1,
+      'is_reserved' => 1,
+      'icon' => 'fa-building',
+    ],
+  ]);
diff --git a/sql/civicrm_data/civicrm_county.sqldata.php b/sql/civicrm_data/civicrm_county.sqldata.php
new file mode 100644 (file)
index 0000000..bf1f190
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+return CRM_Core_CodeGen_SqlData::create('civicrm_county')
+  ->addValues([
+    [
+      'name' => 'Alameda',
+      'state_province_id' => 1004,
+    ],
+    [
+      'name' => 'Contra Costa',
+      'state_province_id' => 1004,
+    ],
+    [
+      'name' => 'Marin',
+      'state_province_id' => 1004,
+    ],
+    [
+      'name' => 'San Francisco',
+      'state_province_id' => 1004,
+    ],
+    [
+      'name' => 'San Mateo',
+      'state_province_id' => 1004,
+    ],
+    [
+      'name' => 'Santa Clara',
+      'state_province_id' => 1004,
+    ],
+  ]);
diff --git a/sql/civicrm_data/civicrm_participant_status_type.sqldata.php b/sql/civicrm_data/civicrm_participant_status_type.sqldata.php
new file mode 100644 (file)
index 0000000..2145fee
--- /dev/null
@@ -0,0 +1,129 @@
+<?php
+return CRM_Core_CodeGen_SqlData::create('civicrm_participant_status_type')
+  ->addDefaults([
+    'is_active' => 1,
+    'is_reserved' => 1,
+    'visibility_id' => 2,
+  ])
+  ->addValues([
+    [
+      'name' => 'Registered',
+      'label' => ts('Registered'),
+      'class' => 'Positive',
+      'is_counted' => 1,
+      'weight' => 1,
+      'visibility_id' => 1,
+    ],
+    [
+      'name' => 'Attended',
+      'label' => ts('Attended'),
+      'class' => 'Positive',
+      'is_reserved' => 0,
+      'is_counted' => 1,
+      'weight' => 2,
+    ],
+    [
+      'name' => 'No-show',
+      'label' => ts('No-show'),
+      'class' => 'Negative',
+      'is_reserved' => 0,
+      'is_counted' => 0,
+      'weight' => 3,
+    ],
+    [
+      'name' => 'Cancelled',
+      'label' => ts('Cancelled'),
+      'class' => 'Negative',
+      'is_counted' => 0,
+      'weight' => 4,
+    ],
+    [
+      'name' => 'Pending from pay later',
+      'label' => ts('Pending (pay later)'),
+      'class' => 'Pending',
+      'is_counted' => 1,
+      'weight' => 5,
+    ],
+    [
+      'name' => 'Pending from incomplete transaction',
+      'label' => ts('Pending (incomplete transaction)'),
+      'class' => 'Pending',
+      'is_counted' => 0,
+      'weight' => 6,
+    ],
+    [
+      'name' => 'On waitlist',
+      'label' => ts('On waitlist'),
+      'class' => 'Waiting',
+      'is_active' => 0,
+      'is_counted' => 0,
+      'weight' => 7,
+    ],
+    [
+      'name' => 'Awaiting approval',
+      'label' => ts('Awaiting approval'),
+      'class' => 'Waiting',
+      'is_active' => 0,
+      'is_counted' => 1,
+      'weight' => 8,
+    ],
+    [
+      'name' => 'Pending from waitlist',
+      'label' => ts('Pending from waitlist'),
+      'class' => 'Pending',
+      'is_active' => 0,
+      'is_counted' => 1,
+      'weight' => 9,
+    ],
+    [
+      'name' => 'Pending from approval',
+      'label' => ts('Pending from approval'),
+      'class' => 'Pending',
+      'is_active' => 0,
+      'is_counted' => 1,
+      'weight' => 10,
+    ],
+    [
+      'name' => 'Rejected',
+      'label' => ts('Rejected'),
+      'class' => 'Negative',
+      'is_active' => 0,
+      'is_counted' => 0,
+      'weight' => 11,
+    ],
+    [
+      'name' => 'Expired',
+      'label' => ts('Expired'),
+      'class' => 'Negative',
+      'is_counted' => 0,
+      'weight' => 12,
+    ],
+    [
+      'name' => 'Pending in cart',
+      'label' => ts('Pending in cart'),
+      'class' => 'Pending',
+      'is_counted' => 0,
+      'weight' => 13,
+    ],
+    [
+      'name' => 'Partially paid',
+      'label' => ts('Partially paid'),
+      'class' => 'Positive',
+      'is_counted' => 1,
+      'weight' => 14,
+    ],
+    [
+      'name' => 'Pending refund',
+      'label' => ts('Pending refund'),
+      'class' => 'Positive',
+      'is_counted' => 1,
+      'weight' => 15,
+    ],
+    [
+      'name' => 'Transferred',
+      'label' => ts('Transferred'),
+      'class' => 'Negative',
+      'is_counted' => 0,
+      'weight' => 16,
+    ],
+  ]);
diff --git a/sql/civicrm_data/civicrm_uf_field.sqldata.php b/sql/civicrm_data/civicrm_uf_field.sqldata.php
new file mode 100644 (file)
index 0000000..43f291a
--- /dev/null
@@ -0,0 +1,620 @@
+<?php
+
+return CRM_Core_CodeGen_SqlData::create('civicrm_uf_field')
+  ->addDefaults([
+    'is_reserved' => 0,
+    'is_required' => 0,
+    'visibility' => 'User and User Admin Only',
+    'phone_type_id' => NULL,
+    'in_selector' => 0,
+    'is_searchable' => 0,
+    'help_post' => NULL,
+    'location_type_id' => NULL,
+  ])
+  ->addValues([
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'first_name',
+      'is_required' => 1,
+      'weight' => 1,
+      'label' => ts('First Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'last_name',
+      'is_required' => 1,
+      'weight' => 2,
+      'label' => ts('Last Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'street_address',
+      'weight' => 3,
+      'location_type_id' => 1,
+      'label' => ts('Street Address (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'city',
+      'weight' => 4,
+      'location_type_id' => 1,
+      'label' => ts('City (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'postal_code',
+      'weight' => 5,
+      'location_type_id' => 1,
+      'label' => ts('Postal Code (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'country',
+      'weight' => 6,
+      'location_type_id' => 1,
+      'label' => ts('Country (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 1,
+      'field_name' => 'state_province',
+      'weight' => 7,
+      'location_type_id' => 1,
+      'label' => ts('State (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 2,
+      'field_name' => 'first_name',
+      'is_required' => 1,
+      'weight' => 1,
+      'label' => ts('First Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 2,
+      'field_name' => 'last_name',
+      'is_required' => 1,
+      'weight' => 2,
+      'label' => ts('Last Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 2,
+      'field_name' => 'email',
+      'is_required' => 1,
+      'weight' => 3,
+      'label' => ts('Email Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 3,
+      'field_name' => 'participant_status',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 1,
+      'label' => ts('Participant Status'),
+      'field_type' => 'Participant',
+    ],
+    [
+      'uf_group_id' => 4,
+      'field_name' => 'first_name',
+      'is_required' => 1,
+      'weight' => 1,
+      'label' => ts('First Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 4,
+      'field_name' => 'last_name',
+      'is_required' => 1,
+      'weight' => 2,
+      'label' => ts('Last Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 4,
+      'field_name' => 'email',
+      'weight' => 3,
+      'label' => ts('Email Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 5,
+      'field_name' => 'organization_name',
+      'is_required' => 1,
+      'weight' => 2,
+      'label' => ts('Organization Name'),
+      'field_type' => 'Organization',
+    ],
+    [
+      'uf_group_id' => 5,
+      'field_name' => 'email',
+      'weight' => 3,
+      'label' => ts('Email Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 6,
+      'field_name' => 'household_name',
+      'is_required' => 1,
+      'weight' => 2,
+      'label' => ts('Household Name'),
+      'field_type' => 'Household',
+    ],
+    [
+      'uf_group_id' => 6,
+      'field_name' => 'email',
+      'weight' => 3,
+      'label' => ts('Email Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'phone',
+      'is_required' => 1,
+      'weight' => 1,
+      'location_type_id' => 1,
+      'label' => ts('Home Phone'),
+      'field_type' => 'Contact',
+      'phone_type_id' => 1,
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'phone',
+      'is_required' => 1,
+      'weight' => 2,
+      'location_type_id' => 1,
+      'label' => ts('Home Mobile'),
+      'field_type' => 'Contact',
+      'phone_type_id' => 2,
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'street_address',
+      'is_required' => 1,
+      'weight' => 3,
+      'label' => ts('Primary Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'city',
+      'is_required' => 1,
+      'weight' => 4,
+      'label' => ts('City'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'state_province',
+      'is_required' => 1,
+      'weight' => 5,
+      'label' => ts('State'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'postal_code',
+      'is_required' => 1,
+      'weight' => 6,
+      'label' => ts('Postal Code'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'email',
+      'is_required' => 1,
+      'weight' => 7,
+      'label' => ts('Primary Email'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'group',
+      'is_required' => 1,
+      'weight' => 8,
+      'label' => ts('Groups'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'tag',
+      'is_required' => 1,
+      'weight' => 9,
+      'label' => ts('Tags'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'gender_id',
+      'is_required' => 1,
+      'weight' => 10,
+      'label' => ts('Gender'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 7,
+      'field_name' => 'birth_date',
+      'is_required' => 1,
+      'weight' => 11,
+      'label' => ts('Date of Birth'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 8,
+      'field_name' => 'street_address',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 1,
+      'location_type_id' => 1,
+      'label' => ts('Street Address (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 8,
+      'field_name' => 'city',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 2,
+      'location_type_id' => 1,
+      'label' => ts('City (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 8,
+      'field_name' => 'postal_code',
+      'weight' => 3,
+      'location_type_id' => 1,
+      'label' => ts('Postal Code (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 8,
+      'field_name' => 'country',
+      'weight' => 4,
+      'location_type_id' => 1,
+      'label' => ts('Country (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 8,
+      'field_name' => 'state_province',
+      'weight' => 5,
+      'location_type_id' => 1,
+      'label' => ts('State (Home)'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'organization_name',
+      'is_required' => 1,
+      'weight' => 1,
+      'label' => ts('Organization Name'),
+      'field_type' => 'Organization',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'phone',
+      'is_required' => 1,
+      'weight' => 2,
+      'location_type_id' => 3,
+      // FIXME: Space
+      'label' => ts('Phone (Main) '),
+      'field_type' => 'Contact',
+      'phone_type_id' => 1,
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'email',
+      'is_required' => 1,
+      'weight' => 3,
+      'location_type_id' => 3,
+      // FIXME: Space
+      'label' => ts('Email (Main) '),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'street_address',
+      'is_required' => 1,
+      'weight' => 4,
+      'location_type_id' => 3,
+      'label' => ts('Street Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'city',
+      'is_required' => 1,
+      'weight' => 5,
+      'location_type_id' => 3,
+      'label' => ts('City'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'postal_code',
+      'is_required' => 1,
+      'weight' => 6,
+      'location_type_id' => 3,
+      'label' => ts('Postal Code'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'country',
+      'is_required' => 1,
+      'weight' => 7,
+      'location_type_id' => 3,
+      'label' => ts('Country'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 9,
+      'field_name' => 'state_province',
+      'is_required' => 1,
+      'weight' => 8,
+      'location_type_id' => 3,
+      'label' => ts('State/Province'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'financial_type',
+      'is_reserved' => 1,
+      'weight' => 1,
+      'label' => ts('Financial Type'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'total_amount',
+      'is_reserved' => 1,
+      'weight' => 2,
+      'label' => ts('Amount'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'contribution_status_id',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 3,
+      'label' => ts('Status'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'receive_date',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 4,
+      'label' => ts('Contribution Date'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'contribution_source',
+      'weight' => 5,
+      'label' => ts('Contribution Source'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'payment_instrument',
+      'weight' => 6,
+      'label' => ts('Payment Method'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'contribution_check_number',
+      'weight' => 7,
+      'label' => ts('Check Number'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'send_receipt',
+      'weight' => 8,
+      'label' => ts('Send Receipt'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'invoice_id',
+      'weight' => 9,
+      'label' => ts('Invoice ID'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'soft_credit',
+      'weight' => 10,
+      'label' => ts('Soft Credit'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 10,
+      'field_name' => 'soft_credit_type',
+      'weight' => 11,
+      'label' => ts('Soft Credit Type'),
+      'field_type' => 'Contribution',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'membership_type',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 1,
+      'label' => ts('Membership Type'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'membership_join_date',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 2,
+      'label' => ts('Member Since'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'membership_start_date',
+      'is_reserved' => 1,
+      'weight' => 3,
+      'label' => ts('Start Date'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'membership_end_date',
+      'is_reserved' => 1,
+      'weight' => 4,
+      'label' => ts('End Date'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'membership_source',
+      'weight' => 5,
+      'label' => ts('Membership Source'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'send_receipt',
+      'weight' => 6,
+      'label' => ts('Send Receipt'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'financial_type',
+      'is_reserved' => 1,
+      'weight' => 7,
+      'label' => ts('Financial Type'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'total_amount',
+      'is_reserved' => 1,
+      'weight' => 8,
+      'label' => ts('Amount'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'receive_date',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 9,
+      'label' => ts('Contribution Date'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'payment_instrument',
+      'weight' => 10,
+      'label' => ts('Payment Method'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'contribution_check_number',
+      'weight' => 11,
+      'label' => ts('Check Number'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'contribution_status_id',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 12,
+      'label' => ts('Payment Status'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'soft_credit',
+      'weight' => 13,
+
+      'label' => ts('Soft Credit'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 11,
+      'field_name' => 'soft_credit_type',
+      'weight' => 14,
+      'label' => ts('Soft Credit Type'),
+      'field_type' => 'Membership',
+    ],
+    [
+      'uf_group_id' => 12,
+      'field_name' => 'first_name',
+      'is_required' => 1,
+      'weight' => 1,
+      'label' => ts('First Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 12,
+      'field_name' => 'last_name',
+      'is_required' => 1,
+      'weight' => 2,
+      'label' => ts('Last Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 12,
+      'field_name' => 'email',
+      'is_required' => 1,
+      'weight' => 3,
+      'label' => ts('Email Address'),
+      'field_type' => 'Contact',
+    ],
+    [
+      'uf_group_id' => 13,
+      'field_name' => 'prefix_id',
+      'is_reserved' => 1,
+      'weight' => 1,
+      'label' => ts('Individual Prefix'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 13,
+      'field_name' => 'first_name',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 2,
+      'label' => ts('First Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 13,
+      'field_name' => 'last_name',
+      'is_required' => 1,
+      'is_reserved' => 1,
+      'weight' => 3,
+      'label' => ts('Last Name'),
+      'field_type' => 'Individual',
+    ],
+    [
+      'uf_group_id' => 13,
+      'field_name' => 'email',
+      'is_reserved' => 1,
+      'weight' => 4,
+      'location_type_id' => 1,
+      'label' => ts('Email Address'),
+      'field_type' => 'Contact',
+    ],
+  ]);
diff --git a/sql/civicrm_data/civicrm_uf_group.sqldata.php b/sql/civicrm_data/civicrm_uf_group.sqldata.php
new file mode 100644 (file)
index 0000000..8692f93
--- /dev/null
@@ -0,0 +1,122 @@
+<?php
+
+return CRM_Core_CodeGen_SqlData::create('civicrm_uf_group')
+  ->addValues([
+    [
+      'id' => 1,
+      'name' => 'name_and_address',
+      'group_type' => 'Individual,Contact',
+      'title' => ts('Name and Address'),
+      'is_cms_user' => 0,
+      'is_reserved' => 0,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 2,
+      'name' => 'supporter_profile',
+      'group_type' => 'Individual,Contact',
+      'title' => ts('Supporter Profile'),
+      'is_cms_user' => 2,
+      'is_reserved' => 0,
+      'help_post' => '<p><strong>' . ts('The information you provide will NOT be shared with any third party organisations.') . '</strong></p><p>' . ts('Thank you for getting involved in our campaign!') . '</p>',
+    ],
+    [
+      'id' => 3,
+      'name' => 'participant_status',
+      'group_type' => 'Participant',
+      'title' => ts('Participant Status'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 4,
+      'name' => 'new_individual',
+      'group_type' => 'Individual,Contact',
+      'title' => ts('New Individual'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 5,
+      'name' => 'new_organization',
+      'group_type' => 'Organization,Contact',
+      'title' => ts('New Organization'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 6,
+      'name' => 'new_household',
+      'group_type' => 'Household,Contact',
+      'title' => ts('New Household'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 7,
+      'name' => 'summary_overlay',
+      'group_type' => 'Contact',
+      'title' => ts('Summary Overlay'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 8,
+      'name' => 'shared_address',
+      'group_type' => 'Contact',
+      'title' => ts('Shared Address'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 9,
+      'name' => 'on_behalf_organization',
+      'group_type' => 'Contact,Organization',
+      'title' => ts('On Behalf Of Organization'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 10,
+      'name' => 'contribution_batch_entry',
+      'group_type' => 'Contribution',
+      'title' => ts('Contribution Bulk Entry'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 11,
+      'name' => 'membership_batch_entry',
+      'group_type' => 'Membership',
+      'title' => ts('Membership Bulk Entry'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 12,
+      'name' => 'event_registration',
+      'group_type' => 'Individual,Contact',
+      'title' => ts('Your Registration Info'),
+      'is_cms_user' => 0,
+      'is_reserved' => 0,
+      'help_post' => NULL,
+    ],
+    [
+      'id' => 13,
+      'name' => 'honoree_individual',
+      'group_type' => 'Individual,Contact',
+      'title' => ts('Honoree Individual'),
+      'is_cms_user' => 0,
+      'is_reserved' => 1,
+      'help_post' => NULL,
+    ],
+  ]);
diff --git a/sql/civicrm_data/civicrm_uf_join.sqldata.php b/sql/civicrm_data/civicrm_uf_join.sqldata.php
new file mode 100644 (file)
index 0000000..9d53e2c
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+return CRM_Core_CodeGen_SqlData::create('civicrm_uf_join')
+  ->addDefaults([
+    'is_active' => 1,
+    'entity_table' => NULL,
+    'entity_id' => NULL,
+  ])
+  ->addValues([
+    [
+      'module' => 'User Registration',
+      'weight' => 1,
+      'uf_group_id' => 1,
+    ],
+    [
+      'module' => 'User Account',
+      'weight' => 1,
+      'uf_group_id' => 1,
+    ],
+    [
+      'module' => 'Profile',
+      'weight' => 1,
+      'uf_group_id' => 1,
+    ],
+    [
+      'module' => 'Profile',
+      'weight' => 2,
+      'uf_group_id' => 2,
+    ],
+    [
+      'module' => 'Profile',
+      'weight' => 11,
+      'uf_group_id' => 12,
+    ],
+  ]);
index 0e59e18c6a6d594747c59b872801b22b44f2cef1..f6329c6e8ec409669570cc9b7a6e8776e3826f4d 100644 (file)
@@ -162,13 +162,7 @@ VALUES (@drgid, 'civicrm_contact', 'first_name',     '5'),
        (@drgid, 'civicrm_contact', 'middle_name',    '1'),
        (@drgid, 'civicrm_contact', 'suffix_id',      '1');
 
--- Sample counties (state-province and country lists defined in a separate tpl files)
-INSERT INTO civicrm_county (name, state_province_id) VALUES ('Alameda', 1004);
-INSERT INTO civicrm_county (name, state_province_id) VALUES ('Contra Costa', 1004);
-INSERT INTO civicrm_county (name, state_province_id) VALUES ('Marin', 1004);
-INSERT INTO civicrm_county (name, state_province_id) VALUES ('San Francisco', 1004);
-INSERT INTO civicrm_county (name, state_province_id) VALUES ('San Mateo', 1004);
-INSERT INTO civicrm_county (name, state_province_id) VALUES ('Santa Clara', 1004);
+{php}echo (include "sql/civicrm_data/civicrm_county.sqldata.php")->toSQL();{/php}
 
 -- Bounce classification patterns
 INSERT INTO civicrm_mailing_bounce_type
@@ -435,148 +429,12 @@ INSERT INTO civicrm_mailing_bounce_pattern
     (@bounceTypeID, 'syntax error in from address'),
     (@bounceTypeID, 'unknown smtp code');
 
--- add sample and reserved profiles
-
-INSERT INTO civicrm_uf_group
-    (id, name,                 group_type,           title,                                      is_cms_user, is_reserved, help_post) VALUES
-    (1,  'name_and_address',   'Individual,Contact',  '{ts escape="sql"}Name and Address{/ts}',   0,           0,           NULL),
-    (2,  'supporter_profile',  'Individual,Contact',  '{ts escape="sql"}Supporter Profile{/ts}',  2,           0,           '<p><strong>{ts escape="sql"}The information you provide will NOT be shared with any third party organisations.{/ts}</strong></p><p>{ts escape="sql"}Thank you for getting involved in our campaign!{/ts}</p>'),
-    (3,  'participant_status', 'Participant',         '{ts escape="sql"}Participant Status{/ts}',             0,      1,           NULL),
-    (4,  'new_individual',     'Individual,Contact',  '{ts escape="sql"}New Individual{/ts}'    ,             0,      1,           NULL),
-    (5,  'new_organization',   'Organization,Contact','{ts escape="sql"}New Organization{/ts}'  ,             0,      1,           NULL),
-    (6,  'new_household',      'Household,Contact',   '{ts escape="sql"}New Household{/ts}'     ,             0,      1,           NULL),
-    (7,  'summary_overlay',    'Contact',             '{ts escape="sql"}Summary Overlay{/ts}'   ,             0,      1,           NULL),
-    (8,  'shared_address',     'Contact',             '{ts escape="sql"}Shared Address{/ts}'                , 0,      1,           NULL),
-    (9,  'on_behalf_organization', 'Contact,Organization','{ts escape="sql"}On Behalf Of Organization{/ts}',  0,      1,           NULL),
-    (10, 'contribution_batch_entry', 'Contribution', '{ts escape="sql"}Contribution Bulk Entry{/ts}' ,       0,      1,           NULL),
-    (11, 'membership_batch_entry', 'Membership',     '{ts escape="sql"}Membership Bulk Entry{/ts}' ,         0,      1,           NULL),
-    (12, 'event_registration', 'Individual,Contact', '{ts escape="sql"}Your Registration Info{/ts}',         0,      0,           NULL),
-    (13, 'honoree_individual', 'Individual,Contact', '{ts escape="sql"}Honoree Individual{/ts}',             0,      1,           NULL);
-
-
-INSERT INTO civicrm_uf_join
-   (is_active,module,entity_table,entity_id,weight,uf_group_id)
-VALUES
-   (1, 'User Registration',NULL, NULL,1,1),
-   (1, 'User Account', NULL, NULL, 1, 1),
-   (1, 'Profile', NULL, NULL, 1, 1),
-   (1, 'Profile', NULL, NULL, 2, 2),
-   (1, 'Profile', NULL, NULL, 11, 12);
-
-INSERT INTO civicrm_uf_field
-       ( uf_group_id, field_name,              is_required, is_reserved, weight, visibility,                  in_selector, is_searchable, location_type_id, label,                                          field_type,    help_post, phone_type_id ) VALUES
-       (  1,           'first_name',            1,           0,           1,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}First Name{/ts}',               'Individual',   NULL,  NULL),
-       (  1,           'last_name',             1,           0,           2,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Last Name{/ts}',                'Individual',   NULL,  NULL),
-       (  1,           'street_address',        0,           0,           3,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Street Address (Home){/ts}',    'Contact',      NULL,  NULL),
-       (  1,           'city',                  0,           0,           4,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}City (Home){/ts}',              'Contact',      NULL,  NULL),
-       (  1,           'postal_code',           0,           0,           5,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Postal Code (Home){/ts}',       'Contact',      NULL,  NULL),
-       (  1,           'country',               0,           0,           6,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Country (Home){/ts}',           'Contact',      NULL,  NULL),
-       (  1,           'state_province',        0,           0,           7,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}State (Home){/ts}',             'Contact',      NULL,  NULL),
-       (  2,           'first_name',            1,           0,           1,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}First Name{/ts}',               'Individual',   NULL,  NULL),
-       (  2,           'last_name',             1,           0,           2,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Last Name{/ts}',                'Individual',   NULL,  NULL),
-       (  2,           'email',                 1,           0,           3,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Email Address{/ts}',            'Contact',      NULL,  NULL),
-       (  3,           'participant_status',    1,           1,           1,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Participant Status{/ts}',       'Participant',  NULL,  NULL),
-       (  4,           'first_name',            1,           0,           1,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}First Name{/ts}',               'Individual',   NULL,  NULL),
-       (  4,           'last_name',             1,           0,           2,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Last Name{/ts}',                'Individual',   NULL,  NULL),
-       (  4,           'email',                 0,           0,           3,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Email Address{/ts}',            'Contact',      NULL,  NULL),
-       (  5,           'organization_name',     1,           0,           2,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Organization Name{/ts}',        'Organization', NULL,  NULL),
-       (  5,           'email',                 0,           0,           3,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Email Address{/ts}',            'Contact',      NULL,  NULL),
-       (  6,           'household_name',        1,           0,           2,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Household Name{/ts}',           'Household',    NULL,  NULL),
-       (  6,           'email',                 0,           0,           3,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Email Address{/ts}',            'Contact',      NULL,  NULL),
-       (  7,           'phone',                 1,           0,           1,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Home Phone{/ts}',               'Contact',      NULL,  1 ),
-       (  7,           'phone',                 1,           0,           2,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Home Mobile{/ts}',              'Contact',      NULL,  2 ),
-       (  7,           'street_address',        1,           0,           3,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Primary Address{/ts}',          'Contact',      NULL,  NULL),
-       (  7,           'city',                  1,           0,           4,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}City{/ts}',                     'Contact',      NULL,  NULL),
-       (  7,           'state_province',        1,           0,           5,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}State{/ts}',                    'Contact',      NULL,  NULL),
-       (  7,           'postal_code',           1,           0,           6,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Postal Code{/ts}',              'Contact',      NULL,  NULL),
-       (  7,           'email',                 1,           0,           7,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Primary Email{/ts}',            'Contact',      NULL,  NULL),
-       (  7,           'group',                 1,           0,           8,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Groups{/ts}',                   'Contact',      NULL,  NULL),
-       (  7,           'tag',                   1,           0,           9,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Tags{/ts}',                     'Contact',      NULL,  NULL),
-       (  7,           'gender_id',             1,           0,           10,     'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Gender{/ts}',                   'Individual',   NULL,  NULL),
-       (  7,           'birth_date',            1,           0,           11,     'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Date of Birth{/ts}',            'Individual',   NULL,  NULL),
-       (  8,           'street_address',        1,           1,           1,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Street Address (Home){/ts}',    'Contact',      NULL,  NULL),
-       (  8,           'city',                  1,           1,           2,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}City (Home){/ts}',              'Contact',      NULL,  NULL),
-       (  8,           'postal_code',           0,           0,           3,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Postal Code (Home){/ts}',       'Contact',      NULL,  NULL),
-       (  8,           'country',               0,           0,           4,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}Country (Home){/ts}',           'Contact',      NULL,  NULL),
-       (  8,           'state_province',        0,           0,           5,      'User and User Admin Only',  0,           0,             1,             '{ts escape="sql"}State (Home){/ts}',             'Contact',      NULL,  NULL),
-       (  9,           'organization_name',     1,           0,           1,      'User and User Admin Only',  0,           0,             NULL,          '{ts escape="sql"}Organization Name{/ts}',        'Organization', NULL,  NULL),
-       (  9,           'phone',                 1,           0,           2,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}Phone (Main) {/ts}',            'Contact',      NULL,   1),
-       (  9,           'email',                 1,           0,           3,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}Email (Main) {/ts}',            'Contact',      NULL,   NULL),
-       (  9,           'street_address',        1,           0,           4,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}Street Address{/ts}',           'Contact',      NULL,   NULL),
-       (  9,           'city',                  1,           0,           5,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}City{/ts}',                     'Contact',      NULL,   NULL),
-       (  9,           'postal_code',           1,           0,           6,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}Postal Code{/ts}',              'Contact',      NULL,   NULL),
-       (  9,           'country',               1,           0,           7,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}Country{/ts}',                  'Contact',      NULL,   NULL),
-       (  9,           'state_province',        1,           0,           8,      'User and User Admin Only',  0,           0,             3,             '{ts escape="sql"}State/Province{/ts}',         'Contact',      NULL,   NULL),
-       ( 10,     'financial_type',              0, 1, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Financial Type{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'total_amount',                0, 1, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Amount{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'contribution_status_id',      1, 1, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Status{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'receive_date',                1, 1, 4, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Contribution Date{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'contribution_source',         0, 0, 5, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Contribution Source{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'payment_instrument',          0, 0, 6, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Payment Method{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'contribution_check_number',                0, 0, 7, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Check Number{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'send_receipt',                0, 0, 8, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Send Receipt{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'invoice_id',                  0, 0, 9, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Invoice ID{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'soft_credit',                 0, 0, 10, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit{/ts}', 'Contribution', NULL, NULL ),
-       ( 10,     'soft_credit_type',            0, 0, 11, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit Type{/ts}', 'Contribution', NULL, NULL ),
-       ( 11,     'membership_type',             1, 1, 1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Membership Type{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'membership_join_date',        1, 1, 2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Member Since{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'membership_start_date',       0, 1, 3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Start Date{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'membership_end_date',         0, 1, 4, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}End Date{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'membership_source',           0, 0, 5, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Membership Source{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'send_receipt',                0, 0, 6, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Send Receipt{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'financial_type',              0, 1, 7, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Financial Type{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'total_amount',                0, 1, 8, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Amount{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'receive_date',                1, 1, 9, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Contribution Date{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'payment_instrument',          0, 0, 10, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Payment Method{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'contribution_check_number',                0, 0, 11, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Check Number{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'contribution_status_id',      1, 1, 12, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Payment Status{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'soft_credit',                 0, 0, 13, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit{/ts}', 'Membership', NULL, NULL ),
-       ( 11,     'soft_credit_type',            0, 0, 14, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Soft Credit Type{/ts}', 'Membership', NULL, NULL ),
-       ( 12,     'first_name',                  1, 0,  1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}First Name{/ts}',  'Individual', NULL, NULL),
-       ( 12,     'last_name',                   1, 0,  2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Last Name{/ts}',   'Individual',  NULL,  NULL),
-       ( 12,     'email',                       1, 0,  3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Email Address{/ts}', 'Contact', NULL, NULL),
-       ( 13,     'prefix_id',                   0, 1,  1, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Individual Prefix{/ts}', 'Individual', NULL, NULL),
-       ( 13,     'first_name',                  1, 1,  2, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}First Name{/ts}',        'Individual', NULL, NULL),
-       ( 13,     'last_name',                   1, 1,  3, 'User and User Admin Only', 0, 0, NULL, '{ts escape="sql"}Last Name{/ts}',         'Individual', NULL, NULL),
-       ( 13,     'email',                       0, 1,  4, 'User and User Admin Only', 0, 0, 1,    '{ts escape="sql"}Email Address{/ts}',     'Contact', NULL, NULL);
-
-
-INSERT INTO civicrm_participant_status_type
-  (id, name,                                  label,                                                       class,      is_reserved, is_active, is_counted, weight, visibility_id) VALUES
-  (1,  'Registered',                          '{ts escape="sql"}Registered{/ts}',                          'Positive', 1,           1,         1,          1,      1            ),
-  (2,  'Attended',                            '{ts escape="sql"}Attended{/ts}',                            'Positive', 0,           1,         1,          2,      2            ),
-  (3,  'No-show',                             '{ts escape="sql"}No-show{/ts}',                             'Negative', 0,           1,         0,          3,      2            ),
-  (4,  'Cancelled',                           '{ts escape="sql"}Cancelled{/ts}',                           'Negative', 1,           1,         0,          4,      2            ),
-  (5,  'Pending from pay later',              '{ts escape="sql"}Pending (pay later){/ts}',                 'Pending',  1,           1,         1,          5,      2            ),
-  (6,  'Pending from incomplete transaction', '{ts escape="sql"}Pending (incomplete transaction){/ts}',    'Pending',  1,           1,         0,          6,      2            ),
-  (7,  'On waitlist',                         '{ts escape="sql"}On waitlist{/ts}',                         'Waiting',  1,           0,         0,          7,      2            ),
-  (8,  'Awaiting approval',                   '{ts escape="sql"}Awaiting approval{/ts}',                   'Waiting',  1,           0,         1,          8,      2            ),
-  (9,  'Pending from waitlist',               '{ts escape="sql"}Pending from waitlist{/ts}',               'Pending',  1,           0,         1,          9,      2            ),
-  (10, 'Pending from approval',               '{ts escape="sql"}Pending from approval{/ts}',               'Pending',  1,           0,         1,          10,     2            ),
-  (11, 'Rejected',                            '{ts escape="sql"}Rejected{/ts}',                            'Negative', 1,           0,         0,          11,     2            ),
-  (12, 'Expired',                             '{ts escape="sql"}Expired{/ts}',                             'Negative', 1,           1,         0,          12,     2            ),
-  (13, 'Pending in cart',                     '{ts escape="sql"}Pending in cart{/ts}',                     'Pending',  1,           1,         0,          13,     2            ),
-  (14,  'Partially paid',                      '{ts escape="sql"}Partially paid{/ts}',                      'Positive', 1,           1,         1,          14,     2           ),
-  (15,  'Pending refund',                      '{ts escape="sql"}Pending refund{/ts}',                      'Positive', 1,           1,         1,          15,     2           ),
-  (16,  'Transferred',                         '{ts escape="sql"}Transferred{/ts}',                         'Negative', 1, 1, 0, 16, 2);
-
--- CRM-8150
-INSERT INTO civicrm_action_mapping
-(entity, entity_value, entity_value_label, entity_status, entity_status_label, entity_date_start, entity_date_end, entity_recipient)
-VALUES
-( 'civicrm_activity', 'activity_type', 'Activity Type', 'activity_status', 'Activity Status', 'activity_date_time', NULL, 'activity_contacts'),
-( 'civicrm_participant', 'event_type', 'Event Type', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'),
-( 'civicrm_participant', 'civicrm_event', 'Event Name', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'),
-( 'civicrm_membership', 'civicrm_membership_type', 'Membership Type', 'auto_renew_options', 'Auto Renew Options', 'membership_join_date', 'membership_end_date', NULL),
-( 'civicrm_participant', 'event_template', 'Event Template', 'civicrm_participant_status_type', 'Participant Status', 'event_start_date', 'event_end_date', 'event_contacts'),
-( 'civicrm_contact', 'civicrm_contact', 'Date Field', 'contact_date_reminder_options', 'Annual Options', 'date_field', NULL, NULL);
-
-INSERT INTO `civicrm_contact_type`
-  (`id`, `name`, `label`,`image_URL`, `parent_id`, `is_active`,`is_reserved`, `icon`)
- VALUES
-  ( 1, 'Individual'  , '{ts escape="sql"}Individual{/ts}'  , NULL, NULL, 1, 1, 'fa-user'),
-  ( 2, 'Household'   , '{ts escape="sql"}Household{/ts}'   , NULL, NULL, 1, 1, 'fa-home'),
-  ( 3, 'Organization', '{ts escape="sql"}Organization{/ts}', NULL, NULL, 1, 1, 'fa-building');
+{php}echo (include "sql/civicrm_data/civicrm_uf_group.sqldata.php")->toSQL();{/php}
+{php}echo (include "sql/civicrm_data/civicrm_uf_join.sqldata.php")->toSQL();{/php}
+{php}echo (include "sql/civicrm_data/civicrm_uf_field.sqldata.php")->toSQL();{/php}
+{php}echo (include "sql/civicrm_data/civicrm_participant_status_type.sqldata.php")->toSQL();{/php}
+{php}echo (include "sql/civicrm_data/civicrm_action_mapping.sqldata.php")->toSQL();{/php}
+{php}echo (include "sql/civicrm_data/civicrm_contact_type.sqldata.php")->toSQL();{/php}
 
 {include file='civicrm_msg_template.tpl'}