| 1 | <?php |
| 2 | /* |
| 3 | +--------------------------------------------------------------------+ |
| 4 | | CiviCRM version 4.6 | |
| 5 | +--------------------------------------------------------------------+ |
| 6 | | Copyright CiviCRM LLC (c) 2004-2015 | |
| 7 | +--------------------------------------------------------------------+ |
| 8 | | This file is a part of CiviCRM. | |
| 9 | | | |
| 10 | | CiviCRM is free software; you can copy, modify, and distribute it | |
| 11 | | under the terms of the GNU Affero General Public License | |
| 12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | |
| 13 | | | |
| 14 | | CiviCRM is distributed in the hope that it will be useful, but | |
| 15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 17 | | See the GNU Affero General Public License for more details. | |
| 18 | | | |
| 19 | | You should have received a copy of the GNU Affero General Public | |
| 20 | | License and the CiviCRM Licensing Exception along | |
| 21 | | with this program; if not, contact CiviCRM LLC | |
| 22 | | at info[AT]civicrm[DOT]org. If you have questions about the | |
| 23 | | GNU Affero General Public License or the licensing of CiviCRM, | |
| 24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | |
| 25 | +--------------------------------------------------------------------+ |
| 26 | */ |
| 27 | |
| 28 | /** |
| 29 | * |
| 30 | * @package CRM |
| 31 | * @copyright CiviCRM LLC (c) 2004-2015 |
| 32 | * $Id$ |
| 33 | * |
| 34 | */ |
| 35 | class CRM_Core_I18n_SchemaStructure_3_0_alpha1 { |
| 36 | /** |
| 37 | * @return array |
| 38 | */ |
| 39 | public static function &columns() { |
| 40 | static $result = NULL; |
| 41 | if (!$result) { |
| 42 | $result = array( |
| 43 | 'civicrm_option_group' => array( |
| 44 | 'label' => 'varchar(255)', |
| 45 | 'description' => 'varchar(255)', |
| 46 | ), |
| 47 | 'civicrm_price_set' => array( |
| 48 | 'title' => 'varchar(255)', |
| 49 | 'help_pre' => 'text', |
| 50 | 'help_post' => 'text', |
| 51 | ), |
| 52 | 'civicrm_contact' => array( |
| 53 | 'sort_name' => 'varchar(128)', |
| 54 | 'display_name' => 'varchar(128)', |
| 55 | 'first_name' => 'varchar(64)', |
| 56 | 'middle_name' => 'varchar(64)', |
| 57 | 'last_name' => 'varchar(64)', |
| 58 | 'email_greeting_display' => 'varchar(255)', |
| 59 | 'postal_greeting_display' => 'varchar(255)', |
| 60 | 'addressee_display' => 'varchar(255)', |
| 61 | 'household_name' => 'varchar(128)', |
| 62 | 'organization_name' => 'varchar(128)', |
| 63 | ), |
| 64 | 'civicrm_premiums' => array( |
| 65 | 'premiums_intro_title' => 'varchar(255)', |
| 66 | 'premiums_intro_text' => 'text', |
| 67 | ), |
| 68 | 'civicrm_product' => array( |
| 69 | 'name' => 'varchar(255)', |
| 70 | 'description' => 'text', |
| 71 | 'options' => 'text', |
| 72 | ), |
| 73 | 'civicrm_membership_type' => array( |
| 74 | 'name' => 'varchar(128)', |
| 75 | 'description' => 'varchar(255)', |
| 76 | ), |
| 77 | 'civicrm_membership_status' => array( |
| 78 | 'name' => 'varchar(128)', |
| 79 | ), |
| 80 | 'civicrm_participant_status_type' => array( |
| 81 | 'label' => 'varchar(255)', |
| 82 | ), |
| 83 | 'civicrm_tell_friend' => array( |
| 84 | 'title' => 'varchar(255)', |
| 85 | 'intro' => 'text', |
| 86 | 'suggested_message' => 'text', |
| 87 | 'thankyou_title' => 'varchar(255)', |
| 88 | 'thankyou_text' => 'text', |
| 89 | ), |
| 90 | 'civicrm_custom_group' => array( |
| 91 | 'title' => 'varchar(64)', |
| 92 | 'help_pre' => 'text', |
| 93 | 'help_post' => 'text', |
| 94 | ), |
| 95 | 'civicrm_custom_field' => array( |
| 96 | 'label' => 'varchar(255)', |
| 97 | 'help_pre' => 'text', |
| 98 | 'help_post' => 'text', |
| 99 | ), |
| 100 | 'civicrm_option_value' => array( |
| 101 | 'label' => 'varchar(255)', |
| 102 | 'description' => 'varchar(255)', |
| 103 | ), |
| 104 | 'civicrm_price_field' => array( |
| 105 | 'label' => 'varchar(255)', |
| 106 | 'help_pre' => 'text', |
| 107 | 'help_post' => 'text', |
| 108 | ), |
| 109 | 'civicrm_contribution_page' => array( |
| 110 | 'title' => 'varchar(255)', |
| 111 | 'intro_text' => 'text', |
| 112 | 'pay_later_text' => 'text', |
| 113 | 'pay_later_receipt' => 'text', |
| 114 | 'thankyou_title' => 'varchar(255)', |
| 115 | 'thankyou_text' => 'text', |
| 116 | 'thankyou_footer' => 'text', |
| 117 | 'for_organization' => 'text', |
| 118 | 'receipt_from_name' => 'varchar(255)', |
| 119 | 'receipt_text' => 'text', |
| 120 | 'footer_text' => 'text', |
| 121 | 'honor_block_title' => 'varchar(255)', |
| 122 | 'honor_block_text' => 'text', |
| 123 | ), |
| 124 | 'civicrm_membership_block' => array( |
| 125 | 'new_title' => 'varchar(255)', |
| 126 | 'new_text' => 'text', |
| 127 | 'renewal_title' => 'varchar(255)', |
| 128 | 'renewal_text' => 'text', |
| 129 | ), |
| 130 | 'civicrm_uf_group' => array( |
| 131 | 'title' => 'varchar(64)', |
| 132 | 'help_pre' => 'text', |
| 133 | 'help_post' => 'text', |
| 134 | ), |
| 135 | 'civicrm_uf_field' => array( |
| 136 | 'help_post' => 'text', |
| 137 | 'label' => 'varchar(255)', |
| 138 | ), |
| 139 | 'civicrm_event' => array( |
| 140 | 'title' => 'varchar(255)', |
| 141 | 'summary' => 'text', |
| 142 | 'description' => 'text', |
| 143 | 'registration_link_text' => 'varchar(255)', |
| 144 | 'event_full_text' => 'text', |
| 145 | 'fee_label' => 'varchar(255)', |
| 146 | 'intro_text' => 'text', |
| 147 | 'footer_text' => 'text', |
| 148 | 'confirm_title' => 'varchar(255)', |
| 149 | 'confirm_text' => 'text', |
| 150 | 'confirm_footer_text' => 'text', |
| 151 | 'confirm_email_text' => 'text', |
| 152 | 'confirm_from_name' => 'varchar(255)', |
| 153 | 'thankyou_title' => 'varchar(255)', |
| 154 | 'thankyou_text' => 'text', |
| 155 | 'thankyou_footer_text' => 'text', |
| 156 | 'pay_later_text' => 'text', |
| 157 | 'pay_later_receipt' => 'text', |
| 158 | 'waitlist_text' => 'text', |
| 159 | 'approval_req_text' => 'text', |
| 160 | 'template_title' => 'varchar(255)', |
| 161 | ), |
| 162 | ); |
| 163 | } |
| 164 | return $result; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * @return array |
| 169 | */ |
| 170 | public static function &indices() { |
| 171 | static $result = NULL; |
| 172 | if (!$result) { |
| 173 | $result = array( |
| 174 | 'civicrm_price_set' => array( |
| 175 | 'UI_title' => array( |
| 176 | 'name' => 'UI_title', |
| 177 | 'field' => array( |
| 178 | 'title', |
| 179 | ), |
| 180 | 'unique' => 1, |
| 181 | ), |
| 182 | ), |
| 183 | 'civicrm_contact' => array( |
| 184 | 'index_sort_name' => array( |
| 185 | 'name' => 'index_sort_name', |
| 186 | 'field' => array( |
| 187 | 'sort_name', |
| 188 | ), |
| 189 | ), |
| 190 | 'index_first_name' => array( |
| 191 | 'name' => 'index_first_name', |
| 192 | 'field' => array( |
| 193 | 'first_name', |
| 194 | ), |
| 195 | ), |
| 196 | 'index_last_name' => array( |
| 197 | 'name' => 'index_last_name', |
| 198 | 'field' => array( |
| 199 | 'last_name', |
| 200 | ), |
| 201 | ), |
| 202 | 'index_household_name' => array( |
| 203 | 'name' => 'index_household_name', |
| 204 | 'field' => array( |
| 205 | 'household_name', |
| 206 | ), |
| 207 | ), |
| 208 | 'index_organization_name' => array( |
| 209 | 'name' => 'index_organization_name', |
| 210 | 'field' => array( |
| 211 | 'organization_name', |
| 212 | ), |
| 213 | ), |
| 214 | ), |
| 215 | 'civicrm_custom_group' => array( |
| 216 | 'UI_title_extends' => array( |
| 217 | 'name' => 'UI_title_extends', |
| 218 | 'field' => array( |
| 219 | 'title', |
| 220 | 'extends', |
| 221 | ), |
| 222 | 'unique' => 1, |
| 223 | ), |
| 224 | ), |
| 225 | 'civicrm_custom_field' => array( |
| 226 | 'UI_label_custom_group_id' => array( |
| 227 | 'name' => 'UI_label_custom_group_id', |
| 228 | 'field' => array( |
| 229 | 'label', |
| 230 | 'custom_group_id', |
| 231 | ), |
| 232 | 'unique' => 1, |
| 233 | ), |
| 234 | ), |
| 235 | ); |
| 236 | } |
| 237 | return $result; |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * @return array $result |
| 242 | */ |
| 243 | public static function &tables() { |
| 244 | static $result = NULL; |
| 245 | if (!$result) { |
| 246 | $result = array_keys(self::columns()); |
| 247 | } |
| 248 | return $result; |
| 249 | } |
| 250 | |
| 251 | } |