| 1 | <?php |
| 2 | /* |
| 3 | +--------------------------------------------------------------------+ |
| 4 | | CiviCRM version 4.3 | |
| 5 | +--------------------------------------------------------------------+ |
| 6 | | Copyright CiviCRM LLC (c) 2004-2013 | |
| 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-2013 |
| 32 | * $Id$ |
| 33 | * |
| 34 | */ |
| 35 | class CRM_Core_I18n_SchemaStructure_3_4_beta2 { |
| 36 | static function &columns() { |
| 37 | static $result = NULL; |
| 38 | if (!$result) { |
| 39 | $result = array( |
| 40 | 'civicrm_option_group' => array( |
| 41 | 'label' => "varchar(255)", |
| 42 | 'description' => "varchar(255)", |
| 43 | ), |
| 44 | 'civicrm_contact' => array( |
| 45 | 'sort_name' => "varchar(128)", |
| 46 | 'display_name' => "varchar(128)", |
| 47 | 'first_name' => "varchar(64)", |
| 48 | 'middle_name' => "varchar(64)", |
| 49 | 'last_name' => "varchar(64)", |
| 50 | 'email_greeting_display' => "varchar(255)", |
| 51 | 'postal_greeting_display' => "varchar(255)", |
| 52 | 'addressee_display' => "varchar(255)", |
| 53 | 'household_name' => "varchar(128)", |
| 54 | 'organization_name' => "varchar(128)", |
| 55 | ), |
| 56 | 'civicrm_contact_type' => array( |
| 57 | 'label' => "varchar(64)", |
| 58 | 'description' => "text", |
| 59 | ), |
| 60 | 'civicrm_mailing_component' => array( |
| 61 | 'name' => "varchar(64)", |
| 62 | 'subject' => "varchar(255)", |
| 63 | 'body_html' => "text", |
| 64 | 'body_text' => "text", |
| 65 | ), |
| 66 | 'civicrm_premiums' => array( |
| 67 | 'premiums_intro_title' => "varchar(255)", |
| 68 | 'premiums_intro_text' => "text", |
| 69 | ), |
| 70 | 'civicrm_product' => array( |
| 71 | 'name' => "varchar(255)", |
| 72 | 'description' => "text", |
| 73 | 'options' => "text", |
| 74 | ), |
| 75 | 'civicrm_membership_type' => array( |
| 76 | 'name' => "varchar(128)", |
| 77 | 'description' => "varchar(255)", |
| 78 | ), |
| 79 | 'civicrm_membership_status' => array( |
| 80 | 'label' => "varchar(128)", |
| 81 | ), |
| 82 | 'civicrm_participant_status_type' => array( |
| 83 | 'label' => "varchar(255)", |
| 84 | ), |
| 85 | 'civicrm_tell_friend' => array( |
| 86 | 'title' => "varchar(255)", |
| 87 | 'intro' => "text", |
| 88 | 'suggested_message' => "text", |
| 89 | 'thankyou_title' => "varchar(255)", |
| 90 | 'thankyou_text' => "text", |
| 91 | ), |
| 92 | 'civicrm_price_set' => array( |
| 93 | 'title' => "varchar(255)", |
| 94 | 'help_pre' => "text", |
| 95 | 'help_post' => "text", |
| 96 | ), |
| 97 | 'civicrm_batch' => array( |
| 98 | 'label' => "varchar(64)", |
| 99 | 'description' => "text", |
| 100 | ), |
| 101 | 'civicrm_custom_group' => array( |
| 102 | 'title' => "varchar(64)", |
| 103 | 'help_pre' => "text", |
| 104 | 'help_post' => "text", |
| 105 | ), |
| 106 | 'civicrm_custom_field' => array( |
| 107 | 'label' => "varchar(255)", |
| 108 | 'help_pre' => "text", |
| 109 | 'help_post' => "text", |
| 110 | ), |
| 111 | 'civicrm_dashboard' => array( |
| 112 | 'label' => "varchar(255)", |
| 113 | ), |
| 114 | 'civicrm_option_value' => array( |
| 115 | 'label' => "varchar(255)", |
| 116 | 'description' => "text", |
| 117 | ), |
| 118 | 'civicrm_mailing' => array( |
| 119 | 'name' => "varchar(128)", |
| 120 | 'from_name' => "varchar(128)", |
| 121 | 'subject' => "varchar(128)", |
| 122 | 'body_text' => "longtext", |
| 123 | 'body_html' => "longtext", |
| 124 | ), |
| 125 | 'civicrm_contribution_page' => array( |
| 126 | 'title' => "varchar(255)", |
| 127 | 'intro_text' => "text", |
| 128 | 'pay_later_text' => "text", |
| 129 | 'pay_later_receipt' => "text", |
| 130 | 'thankyou_title' => "varchar(255)", |
| 131 | 'thankyou_text' => "text", |
| 132 | 'thankyou_footer' => "text", |
| 133 | 'for_organization' => "text", |
| 134 | 'receipt_from_name' => "varchar(255)", |
| 135 | 'receipt_text' => "text", |
| 136 | 'footer_text' => "text", |
| 137 | 'honor_block_title' => "varchar(255)", |
| 138 | 'honor_block_text' => "text", |
| 139 | ), |
| 140 | 'civicrm_membership_block' => array( |
| 141 | 'new_title' => "varchar(255)", |
| 142 | 'new_text' => "text", |
| 143 | 'renewal_title' => "varchar(255)", |
| 144 | 'renewal_text' => "text", |
| 145 | ), |
| 146 | 'civicrm_price_field' => array( |
| 147 | 'label' => "varchar(255)", |
| 148 | 'help_pre' => "text", |
| 149 | 'help_post' => "text", |
| 150 | ), |
| 151 | 'civicrm_price_field_value' => array( |
| 152 | 'label' => "varchar(255)", |
| 153 | 'description' => "text", |
| 154 | ), |
| 155 | 'civicrm_uf_group' => array( |
| 156 | 'title' => "varchar(64)", |
| 157 | 'help_pre' => "text", |
| 158 | 'help_post' => "text", |
| 159 | ), |
| 160 | 'civicrm_uf_field' => array( |
| 161 | 'help_post' => "text", |
| 162 | 'help_pre' => "text", |
| 163 | 'label' => "varchar(255)", |
| 164 | ), |
| 165 | 'civicrm_address' => array( |
| 166 | 'street_address' => "varchar(96)", |
| 167 | 'supplemental_address_1' => "varchar(96)", |
| 168 | 'supplemental_address_2' => "varchar(96)", |
| 169 | 'supplemental_address_3' => "varchar(96)", |
| 170 | 'city' => "varchar(64)", |
| 171 | 'name' => "varchar(255)", |
| 172 | ), |
| 173 | 'civicrm_event' => array( |
| 174 | 'title' => "varchar(255)", |
| 175 | 'summary' => "text", |
| 176 | 'description' => "text", |
| 177 | 'registration_link_text' => "varchar(255)", |
| 178 | 'event_full_text' => "text", |
| 179 | 'fee_label' => "varchar(255)", |
| 180 | 'intro_text' => "text", |
| 181 | 'footer_text' => "text", |
| 182 | 'confirm_title' => "varchar(255)", |
| 183 | 'confirm_text' => "text", |
| 184 | 'confirm_footer_text' => "text", |
| 185 | 'confirm_email_text' => "text", |
| 186 | 'confirm_from_name' => "varchar(255)", |
| 187 | 'thankyou_title' => "varchar(255)", |
| 188 | 'thankyou_text' => "text", |
| 189 | 'thankyou_footer_text' => "text", |
| 190 | 'pay_later_text' => "text", |
| 191 | 'pay_later_receipt' => "text", |
| 192 | 'waitlist_text' => "text", |
| 193 | 'approval_req_text' => "text", |
| 194 | 'template_title' => "varchar(255)", |
| 195 | ), |
| 196 | ); |
| 197 | } |
| 198 | return $result; |
| 199 | } |
| 200 | |
| 201 | static function &indices() { |
| 202 | static $result = NULL; |
| 203 | if (!$result) { |
| 204 | $result = array( |
| 205 | 'civicrm_contact' => array( |
| 206 | 'index_sort_name' => array( |
| 207 | 'name' => 'index_sort_name', |
| 208 | 'field' => array( |
| 209 | 'sort_name', |
| 210 | ), |
| 211 | ), |
| 212 | 'index_first_name' => array( |
| 213 | 'name' => 'index_first_name', |
| 214 | 'field' => array( |
| 215 | 'first_name', |
| 216 | ), |
| 217 | ), |
| 218 | 'index_last_name' => array( |
| 219 | 'name' => 'index_last_name', |
| 220 | 'field' => array( |
| 221 | 'last_name', |
| 222 | ), |
| 223 | ), |
| 224 | 'index_household_name' => array( |
| 225 | 'name' => 'index_household_name', |
| 226 | 'field' => array( |
| 227 | 'household_name', |
| 228 | ), |
| 229 | ), |
| 230 | 'index_organization_name' => array( |
| 231 | 'name' => 'index_organization_name', |
| 232 | 'field' => array( |
| 233 | 'organization_name', |
| 234 | ), |
| 235 | ), |
| 236 | ), |
| 237 | 'civicrm_price_set' => array( |
| 238 | 'UI_title' => array( |
| 239 | 'name' => 'UI_title', |
| 240 | 'field' => array( |
| 241 | 'title', |
| 242 | ), |
| 243 | 'unique' => 1, |
| 244 | ), |
| 245 | ), |
| 246 | 'civicrm_custom_group' => array( |
| 247 | 'UI_title_extends' => array( |
| 248 | 'name' => 'UI_title_extends', |
| 249 | 'field' => array( |
| 250 | 'title', |
| 251 | 'extends', |
| 252 | ), |
| 253 | 'unique' => 1, |
| 254 | ), |
| 255 | ), |
| 256 | 'civicrm_custom_field' => array( |
| 257 | 'UI_label_custom_group_id' => array( |
| 258 | 'name' => 'UI_label_custom_group_id', |
| 259 | 'field' => array( |
| 260 | 'label', |
| 261 | 'custom_group_id', |
| 262 | ), |
| 263 | 'unique' => 1, |
| 264 | ), |
| 265 | ), |
| 266 | 'civicrm_address' => array( |
| 267 | 'index_city' => array( |
| 268 | 'name' => 'index_city', |
| 269 | 'field' => array( |
| 270 | 'city', |
| 271 | ), |
| 272 | ), |
| 273 | ), |
| 274 | ); |
| 275 | } |
| 276 | return $result; |
| 277 | } |
| 278 | |
| 279 | static function &tables() { |
| 280 | static $result = NULL; |
| 281 | if (!$result) { |
| 282 | $result = array_keys(self::columns()); |
| 283 | } |
| 284 | return $result; |
| 285 | } |
| 286 | } |
| 287 | |