[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/schema/ -> DatabaseSchema.xml (source)

   1  <?xml version="1.0"?>
   2  <schema version="0.2">
   3  
   4      <table name="vtiger_users">
   5          <field name="id" type="I" >
   6              <key />
   7              <autoincrement />
   8          </field>
   9          <field name="user_name" type="C" size="255" />
  10          <field name="user_password" type="C" size="200" />
  11          <field name="user_hash" type="C" size="32" />
  12          <field name="cal_color" type="C" size="25">
  13              <default value="#E6FAD8" />
  14          </field>
  15          <field name="first_name" type="C" size="30" />
  16          <field name="last_name" type="C" size="30" />
  17          <field name="reports_to_id" type="C" size="36" />
  18          <field name="is_admin" type="C" size="3">
  19              <default value="0" />
  20          </field>
  21          <field name="currency_id" type="I" size="19">
  22              <default value="1" />
  23              <notnull />
  24          </field>
  25          <field name="description" type="X" />
  26          <field name="date_entered" type="T">
  27              <notnull />
  28              <deftimestamp />
  29          </field>
  30          <field name="date_modified" type="T">
  31              <notnull />
  32              <deftimestamp />
  33          </field>
  34          <field name="modified_user_id" type="C" size="36" />
  35          <field name="title" type="C" size="50" />
  36          <field name="department" type="C" size="50" />
  37          <field name="phone_home" type="C" size="50" />
  38          <field name="phone_mobile" type="C" size="50" />
  39          <field name="phone_work" type="C" size="50" />
  40          <field name="phone_other" type="C" size="50" />
  41          <field name="phone_fax" type="C" size="50" />
  42          <field name="email1" type="C" size="100" />
  43          <field name="email2" type="C" size="100" />
  44          <field name="secondaryemail" type="C" size="100" />
  45          <field name="status" type="C" size="25" />
  46          <field name="signature" type="C" size="1000" />
  47          <field name="address_street" type="C" size="150" />
  48          <field name="address_city" type="C" size="100" />
  49          <field name="address_state" type="C" size="100" />
  50          <field name="address_country" type="C" size="25" />
  51          <field name="address_postalcode" type="C" size="9" />
  52          <field name="user_preferences" type="X" />
  53          <field name="tz" type="C" size="30" />
  54          <field name="holidays" type="C" size="60" />
  55          <field name="namedays" type="C" size="60" />
  56          <field name="workdays" type="C" size="30" />
  57          <field name="weekstart" type="I" size="11" />
  58          <field name="date_format" type="C" size="200" />
  59          <field name="hour_format" type="C" size="30">
  60              <default value="am/pm" />
  61          </field>
  62          <field name="start_hour" type="C" size="30">
  63              <default value="10:00" />
  64          </field>
  65          <field name="end_hour" type="C" size="30">
  66              <default value="23:00" />
  67          </field>
  68          <field name="activity_view" type="C" size="200">
  69              <default value="Today" />
  70          </field>
  71          <field name="lead_view" type="C" size="200">
  72              <default value="Today" />
  73          </field>
  74          <field name="imagename" type="C" size="250" />
  75          <field name="deleted" type="I" size="1">
  76              <notnull />
  77              <default value="0" />
  78          </field>
  79          <field name="confirm_password" type="C" size="300" />
  80  
  81          <field name="internal_mailer" type="C" size="3">
  82              <notnull />
  83              <default value="1" />
  84          </field>
  85          <field name="reminder_interval" type="C" size="100" />
  86          <field name="reminder_next_time" type="C" size="100" />
  87          <field name="crypt_type" type="C" size="20">
  88              <notnull />
  89              <default value="MD5" />
  90          </field>
  91          <field name="accesskey" type="C" size="36" />
  92          <field name="theme" type="C" size="100" />
  93          <field name="language" type="C" size="36" />
  94          <field name="time_zone" type="C" size="200" />
  95          <field name="currency_grouping_pattern" type="C" size="100" />
  96          <field name="currency_decimal_separator" type="C" size="2" />
  97          <field name="currency_grouping_separator" type="C" size="2" />
  98          <field name="currency_symbol_placement" type="C" size="20" />
  99  
 100          <index name="user_user_name_idx">
 101              <col>user_name</col>
 102          </index>
 103          <index name="user_user_password_idx">
 104              <col>user_password</col>
 105          </index>
 106          <opt platform="mysql">Engine=InnoDB</opt>
 107      </table>
 108  
 109      <table name="vtiger_crmentity">
 110          <field name="crmid" type="I" size="19">
 111              <key />
 112          </field>
 113          <field name="smcreatorid" type="I" size="19">
 114              <notnull/>
 115              <default value="0" />
 116          </field>
 117          <field name="smownerid" type="I" size="19">
 118              <notnull />
 119              <default value="0" />
 120          </field>
 121          <field name="modifiedby" type="I" size="19">
 122              <notnull />
 123              <default value="0" />
 124          </field>
 125          <field name="setype" type="C" size="30">
 126              <notnull />
 127          </field>
 128          <field name="description" type="X" />
 129          <field name="createdtime" type="T">
 130              <notnull />
 131          </field>
 132          <field name="modifiedtime" type="T">
 133              <notnull />
 134          </field>
 135          <field name="viewedtime" type="T" />
 136          <field name="status" type="C" size="50" />
 137          <field name="version" type="I" size="19">
 138              <notnull />
 139              <default value="0" />
 140          </field>
 141          <field name="presence" type="I" size="1">
 142              <default value="1" />
 143          </field>
 144  
 145          <field name="deleted" type="I" size="1">
 146              <notnull />
 147              <default value="0" />
 148          </field>
 149  
 150          <index name="crmentity_smcreatorid_idx">
 151              <col>smcreatorid</col>
 152          </index>
 153          <index name="crmentity_modifiedby_idx">
 154              <col>modifiedby</col>
 155          </index>
 156          <index name="crmentity_deleted_idx">
 157              <col>deleted</col>
 158          </index>
 159          <index name="crm_ownerid_del_setype_idx">
 160              <col>smownerid</col>
 161              <col>deleted</col>
 162              <col>setype</col>
 163          </index>
 164          <opt platform="mysql">Engine=InnoDB</opt>
 165      </table>
 166  
 167      <table name="vtiger_sharedcalendar">
 168          <field name="userid" type="I" size="19">
 169              <key />
 170          </field>
 171          <field name="sharedid" type="I" size="19">
 172              <key />
 173          </field>
 174          <opt platform="mysql">Engine=InnoDB</opt>
 175      </table>
 176  
 177      <table name="vtiger_tab">
 178          <field name="tabid" type="I" size="19">
 179              <key />
 180              <default value="0" />
 181          </field>
 182          <field name="name" type="C" size="25">
 183              <notnull />
 184          </field>
 185          <field name="presence" type="I" size="19">
 186              <notnull />
 187              <default value="1" />
 188          </field>
 189          <field name="tabsequence" type="I" size="10" />
 190          <field name="tablabel" type="C" size="25">
 191              <notnull />
 192          </field>
 193          <field name="modifiedby" type="I" size="19" />
 194          <field name="modifiedtime" type="I" size="19" />
 195          <field name="customized" type="I" size="19" />
 196          <field name="ownedby" type="I" size="19" />
 197          <field name="isentitytype" type="I">
 198              <notnull />
 199              <default value="1" />
 200          </field>
 201                  <field name="trial" type="I"  size="1">
 202              <notnull />
 203              <default value="0" />
 204          </field>
 205          <field name="version" type="C" size="10" />
 206          <field name="parent" type="C" size="30"/>
 207  
 208          <index name="tab_name_idx">
 209              <col>name</col>
 210              <unique />
 211          </index>
 212          <index name="tab_modifiedby_idx">
 213              <col>modifiedby</col>
 214          </index>
 215          <index name="tab_tabid_idx">
 216              <col>tabid</col>
 217          </index>
 218          <opt platform="mysql">Engine=InnoDB</opt>
 219      </table>
 220  
 221      <table name="vtiger_blocks">
 222          <field name="blockid" type="I" size="19">
 223              <key />
 224              <notnull />
 225          </field>
 226          <field name="tabid" type="I" size="19">
 227              <notnull />
 228          </field>
 229          <field name="blocklabel" type="C" size="100">
 230              <notnull />
 231          </field>
 232          <field name="sequence" type="I" size="10" />
 233          <field name="show_title" type="I" size="2" />
 234          <field name="visible" type="I" size="2">
 235              <notnull />
 236              <default value="0" />
 237          </field>
 238          <field name="create_view" type="I" size="2">
 239              <notnull />
 240              <default value="0" />
 241          </field>
 242          <field name="edit_view" type="I" size="2">
 243              <notnull />
 244              <default value="0" />
 245          </field>
 246          <field name="detail_view" type="I" size="2">
 247              <notnull />
 248              <default value="0" />
 249          </field>
 250          <field name="display_status" type="I" size="1">
 251              <notnull />
 252              <default value="1" />
 253          </field>
 254          <field name="iscustom" type="I" size="1">
 255              <notnull />
 256              <default value="0" />
 257          </field>
 258          <index name="block_tabid_idx">
 259              <col>tabid</col>
 260          </index>
 261          <opt platform="mysql">Engine=InnoDB</opt>
 262      </table>
 263  
 264      <table name="vtiger_blocks" alter="true">
 265          <constraint>ADD CONSTRAINT fk_1_vtiger_blocks FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
 266          <opt>Engine=InnoDB</opt>
 267          <data>
 268          </data>
 269      </table>
 270  
 271      <table name="vtiger_field">
 272          <field name="tabid" type="I" size="19">
 273              <notnull />
 274          </field>
 275          <field name="fieldid" type="I" size="19">
 276              <key />
 277              <autoincrement />
 278          </field>
 279          <field name="columnname" type="C" size="30">
 280              <notnull />
 281          </field>
 282          <field name="tablename" type="C" size="50">
 283              <notnull />
 284          </field>
 285          <field name="generatedtype" type="I" size="19">
 286              <notnull />
 287              <default value="0" />
 288          </field>
 289          <field name="uitype" type="C" size="30">
 290              <notnull />
 291          </field>
 292          <field name="fieldname" type="C" size="50">
 293              <notnull />
 294          </field>
 295          <field name="fieldlabel" type="C" size="50">
 296              <notnull />
 297          </field>
 298          <field name="readonly" type="I" size="1">
 299              <notnull />
 300          </field>
 301          <field name="presence" type="I" size="19">
 302              <notnull />
 303              <default value="1" />
 304          </field>
 305          <field name="defaultvalue" type="X">
 306          </field>
 307          <field name="maximumlength" type="I" size="19" />
 308          <field name="sequence" type="I" size="19" />
 309          <field name="block" type="I" size="19" />
 310          <field name="displaytype" type="I" size="19" />
 311          <field name="typeofdata" type="C" size="100" />
 312          <field name="quickcreate" type="I" size="10">
 313              <notnull />
 314              <default value="1" />
 315          </field>
 316          <field name="quickcreatesequence" type="I" size="19" />
 317          <field name="info_type" type="C" size="20" />
 318          <field name="masseditable" type="I" size="10">
 319              <notnull />
 320              <default value="1" />
 321          </field>
 322  
 323          <index name="field_tabid_idx">
 324              <col>tabid</col>
 325          </index>
 326          <index name="field_fieldname_idx">
 327              <col>fieldname</col>
 328          </index>
 329          <index name="field_block_idx">
 330              <col>block</col>
 331          </index>
 332          <index name="field_displaytype_idx">
 333              <col>displaytype</col>
 334          </index>
 335          <opt platform="mysql">Engine=InnoDB</opt>
 336      </table>
 337  
 338      <table name="vtiger_field" alter="true">
 339          <constraint>ADD CONSTRAINT fk_1_vtiger_field FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
 340          <opt>Engine=InnoDB</opt>
 341          <data>
 342          </data>
 343      </table>
 344  
 345      <table name="vtiger_account">
 346          <field name="accountid" type="I" size="19">
 347              <key />
 348              <notnull />
 349              <default value="0" />
 350          </field>
 351          <field name="account_no" type="C" size="100">
 352              <notnull />
 353              <unique />
 354          </field>
 355          <field name="accountname" type="C" size="100">
 356              <unique />
 357              <notnull />
 358          </field>
 359          <field name="parentid" type="I" size="19">
 360              <default value="0" />
 361          </field>
 362          <field name="account_type" type="C" size="200" />
 363          <field name="industry" type="C" size="200" />
 364          <field name="annualrevenue" type="I" size="19">
 365              <default value="0" />
 366          </field>
 367          <field name="rating" type="C" size="200" />
 368          <field name="ownership" type="C" size="50" />
 369          <field name="siccode" type="C" size="50" />
 370          <field name="tickersymbol" type="C" size="30" />
 371          <field name="phone" type="C" size="30" />
 372          <field name="otherphone" type="C" size="30" />
 373          <field name="email1" type="C" size="100" />
 374          <field name="email2" type="C" size="100" />
 375          <field name="website" type="C" size="100" />
 376          <field name="fax" type="C" size="30" />
 377          <field name="employees" type="I" size="10">
 378              <default value="0" />
 379          </field>
 380          <field name="emailoptout" type="C" size="3">
 381              <default value="0" />
 382          </field>
 383          <field name="notify_owner" type="C" size="3">
 384              <default value="0" />
 385          </field>
 386  
 387          <index name="account_account_type_idx">
 388              <col>account_type</col>
 389          </index>
 390          <opt platform="mysql">Engine=InnoDB</opt>
 391      </table>
 392  
 393      <table name="vtiger_account" alter="true">
 394          <constraint>ADD CONSTRAINT fk_1_vtiger_account FOREIGN KEY (accountid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
 395          <opt>Engine=InnoDB</opt>
 396          <data>
 397          </data>
 398      </table>
 399  
 400      <table name="vtiger_accountbillads">
 401          <field name="accountaddressid" type="I" size="19">
 402              <key />
 403              <default value="0" />
 404          </field>
 405          <field name="bill_city" type="C" size="30" />
 406          <field name="bill_code" type="C" size="30" />
 407          <field name="bill_country" type="C" size="30" />
 408          <field name="bill_state" type="C" size="30" />
 409          <field name="bill_street" type="C" size="250" />
 410          <field name="bill_pobox" type="C" size="30" />
 411  
 412          <opt platform="mysql">Engine=InnoDB</opt>
 413      </table>
 414  
 415      <table name="vtiger_accountbillads" alter="true">
 416          <constraint>ADD CONSTRAINT fk_1_vtiger_accountbillads FOREIGN KEY (accountaddressid) REFERENCES vtiger_account(accountid) ON DELETE CASCADE</constraint>
 417          <opt>Engine=InnoDB</opt>
 418          <data>
 419          </data>
 420      </table>
 421  
 422      <table name="vtiger_accountshipads">
 423          <field name="accountaddressid" type="I" size="19">
 424              <key />
 425              <default value="0" />
 426          </field>
 427          <field name="ship_city" type="C" size="30" />
 428          <field name="ship_code" type="C" size="30" />
 429          <field name="ship_country" type="C" size="30" />
 430          <field name="ship_state" type="C" size="30" />
 431          <field name="ship_pobox" type="C" size="30" />
 432          <field name="ship_street" type="C" size="250" />
 433  
 434          <opt platform="mysql">Engine=InnoDB</opt>
 435      </table>
 436  
 437      <table name="vtiger_accountshipads" alter="true">
 438          <constraint>ADD CONSTRAINT fk_1_vtiger_accountshipads FOREIGN KEY (accountaddressid) REFERENCES vtiger_account(accountid) ON DELETE CASCADE</constraint>
 439          <opt>Engine=InnoDB</opt>
 440          <data>
 441          </data>
 442      </table>
 443  
 444      <table name="vtiger_accountscf">
 445          <field name="accountid" type="I" size="19">
 446              <key />
 447              <default value="0" />
 448          </field>
 449  
 450          <opt platform="mysql">Engine=InnoDB</opt>
 451      </table>
 452  
 453      <table name="vtiger_accountscf" alter="true">
 454          <constraint>ADD CONSTRAINT fk_1_vtiger_accountscf FOREIGN KEY (accountid) REFERENCES vtiger_account(accountid) ON DELETE CASCADE</constraint>
 455          <opt>Engine=InnoDB</opt>
 456          <data>
 457          </data>
 458      </table>
 459  
 460      <table name="vtiger_contactdetails">
 461          <field name="contactid" type="I" size="19">
 462              <key />
 463              <default value="0" />
 464          </field>
 465          <field name="contact_no" type="C" size="100">
 466              <notnull />
 467              <unique />
 468          </field>
 469          <field name="accountid" type="I" size="19" />
 470          <field name="salutation" type="C" size="200">
 471          </field>
 472          <field name="firstname" type="C" size="40" />
 473          <field name="lastname" type="C" size="80">
 474              <notnull />
 475          </field>
 476          <field name="email" type="C" size="100" />
 477          <field name="phone" type="C" size="50" />
 478          <field name="mobile" type="C" size="50" />
 479          <field name="title" type="C" size="50" />
 480          <field name="department" type="C" size="30" />
 481          <field name="fax" type="C" size="50" />
 482          <field name="reportsto" type="C" size="30" />
 483          <field name="training" type="C" size="50" />
 484          <field name="usertype" type="C" size="50" />
 485          <field name="contacttype" type="C" size="50" />
 486          <field name="otheremail" type="C" size="100" />
 487          <field name="secondaryemail" type="C" size="100" />
 488          <field name="donotcall" type="C" size="3" />
 489          <field name="emailoptout" type="C" size="3">
 490              <default value="0" />
 491          </field>
 492          <field name="imagename" type="C" size="150" />
 493          <field name="reference" type="C" size="3" />
 494          <field name="notify_owner" type="C" size="3">
 495              <default value="0"/>
 496          </field>
 497  
 498          <index name="contactdetails_accountid_idx">
 499              <col>accountid</col>
 500          </index>
 501          <opt platform="mysql">Engine=InnoDB</opt>
 502      </table>
 503  
 504      <table name="vtiger_contactdetails" alter="true">
 505          <constraint>ADD CONSTRAINT fk_1_vtiger_contactdetails FOREIGN KEY (contactid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
 506          <opt>Engine=InnoDB</opt>
 507          <data>
 508          </data>
 509      </table>
 510  
 511      <table name="vtiger_contactsubdetails">
 512          <field name="contactsubscriptionid" type="I" size="19">
 513              <key />
 514              <default value="0" />
 515          </field>
 516          <field name="homephone" type="C" size="50" />
 517          <field name="otherphone" type="C" size="50" />
 518          <field name="assistant" type="C" size="30" />
 519          <field name="assistantphone" type="C" size="50" />
 520          <field name="birthday" type="D" />
 521          <field name="laststayintouchrequest" type="I" size="30">
 522              <default value="0" />
 523          </field>
 524          <field name="laststayintouchsavedate" type="I" size="19">
 525              <default value="0" />
 526          </field>
 527          <field name="leadsource" type="C" size="200" />
 528  
 529          <opt platform="mysql">Engine=InnoDB</opt>
 530      </table>
 531  
 532      <table name="vtiger_contactsubdetails" alter="true">
 533          <constraint>ADD CONSTRAINT fk_1_vtiger_contactsubdetails FOREIGN KEY (contactsubscriptionid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
 534          <opt>Engine=InnoDB</opt>
 535          <data>
 536          </data>
 537      </table>
 538  
 539      <table name="vtiger_contactaddress">
 540          <field name="contactaddressid" type="I" size="19">
 541              <key />
 542              <default value="0" />
 543          </field>
 544          <field name="mailingcity" type="C" size="40" />
 545          <field name="mailingstreet" type="C" size="250" />
 546          <field name="mailingcountry" type="C" size="40" />
 547          <field name="othercountry" type="C" size="30" />
 548          <field name="mailingstate" type="C" size="30" />
 549          <field name="mailingpobox" type="C" size="30" />
 550          <field name="othercity" type="C" size="40" />
 551          <field name="otherstate" type="C" size="50" />
 552          <field name="mailingzip" type="C" size="30" />
 553          <field name="otherzip" type="C" size="30" />
 554          <field name="otherstreet" type="C" size="250" />
 555          <field name="otherpobox" type="C" size="30" />
 556  
 557          <opt platform="mysql">Engine=InnoDB</opt>
 558      </table>
 559  
 560      <table name="vtiger_contactaddress" alter="true">
 561          <constraint>ADD CONSTRAINT fk_1_vtiger_contactaddress FOREIGN KEY (contactaddressid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
 562          <opt>Engine=InnoDB</opt>
 563          <data>
 564          </data>
 565      </table>
 566  
 567      <table name="vtiger_contactscf">
 568          <field name="contactid" type="I" size="19">
 569              <key />
 570              <default value="0" />
 571          </field>
 572  
 573          <opt platform="mysql">Engine=InnoDB</opt>
 574      </table>
 575  
 576      <table name="vtiger_contactscf" alter="true">
 577          <constraint>ADD CONSTRAINT fk_1_vtiger_contactscf FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
 578          <opt>Engine=InnoDB</opt>
 579          <data>
 580          </data>
 581      </table>
 582  
 583      <table name="vtiger_portalinfo">
 584          <field name="id" type="I" size="11">
 585              <key />
 586          </field>
 587          <field name="user_name" type="C" size="50" />
 588          <field name="user_password" type="C" size="30" />
 589          <field name="type" type="C" size="5" />
 590          <field name="last_login_time" type="T" />
 591          <field name="login_time" type="T" />
 592          <field name="logout_time" type="T" />
 593          <field name="isactive" type="I" size="1" />
 594          <opt platform="mysql">Engine=InnoDB</opt>
 595      </table>
 596  
 597      <table name="vtiger_portalinfo" alter="true">
 598          <constraint>ADD CONSTRAINT fk_1_vtiger_portalinfo FOREIGN KEY (id) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
 599          <opt>Engine=InnoDB</opt>
 600          <data>
 601          </data>
 602      </table>
 603  
 604      <table name="vtiger_customerdetails">
 605          <field name="customerid" type="I" size="19">
 606              <key />
 607          </field>
 608          <field name="portal" type="C" size="3" />
 609          <field name="support_start_date" type="D" />
 610          <field name="support_end_date" type="D" />
 611          <opt platform="mysql">Engine=InnoDB</opt>
 612      </table>
 613  
 614      <table name="vtiger_customerdetails" alter="true">
 615          <constraint>ADD CONSTRAINT fk_1_vtiger_customerdetails FOREIGN KEY (customerid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
 616          <opt>Engine=InnoDB</opt>
 617          <data>
 618          </data>
 619      </table>
 620  
 621      <table name="vtiger_leaddetails">
 622          <field name="leadid" type="I" size="19">
 623              <key />
 624          </field>
 625          <field name="lead_no" type="C" size="100">
 626              <notnull />
 627              <unique />
 628          </field>
 629          <field name="email" type="C" size="100" />
 630          <field name="interest" type="C" size="50" />
 631          <field name="firstname" type="C" size="40" />
 632          <field name="salutation" type="C" size="200" />
 633          <field name="lastname" type="C" size="80">
 634              <notnull />
 635          </field>
 636          <field name="company" type="C" size="100">
 637              <notnull />
 638          </field>
 639          <field name="annualrevenue" type="I" size="19">
 640              <default value="0" />
 641          </field>
 642          <field name="industry" type="C" size="200" />
 643          <field name="campaign" type="C" size="30" />
 644          <field name="rating" type="C" size="200" />
 645          <field name="leadstatus" type="C" size="50" />
 646          <field name="leadsource" type="C" size="200" />
 647          <field name="converted" type="I" size="1">
 648              <default value="0" />
 649          </field>
 650          <field name="designation" type="C" size="50">
 651              <default value="SalesMan" />
 652          </field>
 653          <field name="licencekeystatus" type="C" size="50" />
 654          <field name="space" type="C" size="250" />
 655          <field name="comments" type="X" />
 656          <field name="priority" type="C" size="50" />
 657          <field name="demorequest" type="C" size="50" />
 658          <field name="partnercontact" type="C" size="50" />
 659          <field name="productversion" type="C" size="20" />
 660          <field name="product" type="C" size="50" />
 661          <field name="maildate" type="D" />
 662          <field name="nextstepdate" type="D" />
 663          <field name="fundingsituation" type="C" size="50" />
 664          <field name="purpose" type="C" size="50" />
 665          <field name="evaluationstatus" type="C" size="50" />
 666          <field name="transferdate" type="D" />
 667          <field name="revenuetype" type="C" size="50" />
 668          <field name="noofemployees" type="I" size="50" />
 669          <field name="secondaryemail" type="C" size="100" />
 670          <field name="assignleadchk" type="I" size="1">
 671              <default value="0" />
 672          </field>
 673  
 674          <index name="leaddetails_converted_leadstatus_idx">
 675              <col>converted</col>
 676              <col>leadstatus</col>
 677          </index>
 678          <opt platform="mysql">Engine=InnoDB</opt>
 679      </table>
 680  
 681      <table name="vtiger_leaddetails" alter="true">
 682          <constraint>ADD CONSTRAINT fk_1_vtiger_leaddetails FOREIGN KEY (leadid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
 683          <opt>Engine=InnoDB</opt>
 684          <data>
 685          </data>
 686      </table>
 687  
 688      <table name="vtiger_leadsubdetails">
 689          <field name="leadsubscriptionid" type="I" size="19">
 690              <key />
 691              <default value="0" />
 692          </field>
 693          <field name="website" type="C" size="255" />
 694          <field name="callornot" type="I" size="1">
 695              <default value="0" />
 696          </field>
 697          <field name="readornot" type="I" size="1">
 698              <default value="0" />
 699          </field>
 700          <field name="empct" type="I" size="10">
 701              <default value="0" />
 702          </field>
 703  
 704          <opt platform="mysql">Engine=InnoDB</opt>
 705      </table>
 706  
 707      <table name="vtiger_leadsubdetails" alter="true">
 708          <constraint>ADD CONSTRAINT fk_1_vtiger_leadsubdetails FOREIGN KEY (leadsubscriptionid) REFERENCES vtiger_leaddetails(leadid) ON DELETE CASCADE</constraint>
 709          <opt>Engine=InnoDB</opt>
 710          <data>
 711          </data>
 712      </table>
 713  
 714      <table name="vtiger_leadaddress">
 715          <field name="leadaddressid" type="I" size="19">
 716              <key />
 717              <default value="0" />
 718          </field>
 719          <field name="city" type="C" size="30" />
 720          <field name="code" type="C" size="30" />
 721          <field name="state" type="C" size="30" />
 722          <field name="pobox" type="C" size="30" />
 723          <field name="country" type="C" size="30" />
 724          <field name="phone" type="C" size="50" />
 725          <field name="mobile" type="C" size="50" />
 726          <field name="fax" type="C" size="50" />
 727          <field name="lane" type="C" size="250" />
 728          <field name="leadaddresstype" type="C" size="30">
 729              <default value="Billing" />
 730          </field>
 731  
 732          <opt platform="mysql">Engine=InnoDB</opt>
 733      </table>
 734  
 735      <table name="vtiger_leadaddress" alter="true">
 736          <constraint>ADD CONSTRAINT fk_1_vtiger_leadaddress FOREIGN KEY (leadaddressid) REFERENCES vtiger_leaddetails(leadid) ON DELETE CASCADE</constraint>
 737          <opt>Engine=InnoDB</opt>
 738          <data>
 739          </data>
 740      </table>
 741  
 742      <table name="vtiger_leadscf">
 743          <field name="leadid" type="I" size="19">
 744              <key />
 745              <default value="0" />
 746          </field>
 747  
 748          <opt platform="mysql">Engine=InnoDB</opt>
 749      </table>
 750  
 751      <table name="vtiger_leadscf" alter="true">
 752          <constraint>ADD CONSTRAINT fk_1_vtiger_leadscf FOREIGN KEY (leadid) REFERENCES vtiger_leaddetails(leadid) ON DELETE CASCADE</constraint>
 753          <opt>Engine=InnoDB</opt>
 754          <data>
 755          </data>
 756      </table>
 757  
 758      <table name="vtiger_notes">
 759          <field name="notesid" type="I" size="19">
 760              <key />
 761              <default value="0" />
 762          </field>
 763          <field name="note_no" type="C" size="100">
 764              <notnull />
 765              <unique />
 766          </field>
 767          <field name="title" type="C" size="50">
 768              <notnull />
 769          </field>
 770          <field name="filename" type="C" size="200" />
 771          <field name="notecontent" type="X" />
 772          <field name="folderid" type="I" size="19">
 773              <default value="1" />
 774              <notnull />
 775          </field>
 776          <field name="filetype" type="C" size="50">
 777              <default value="NULL" />
 778          </field>
 779          <field name="filelocationtype" type="C" size="5">
 780              <default value="NULL" />
 781          </field>
 782          <field name="filedownloadcount" type="I" size="19">
 783              <default value="NULL" />
 784          </field>
 785          <field name="filestatus" type="I" size="19">
 786              <default value="NULL" />
 787          </field>
 788          <field name="filesize" type="I" size="19">
 789              <default value="0" />
 790              <notnull />
 791          </field>
 792          <field name="fileversion" type="C" size="50">
 793              <default value="NULL" />
 794          </field>
 795          <index name="notes_title_idx">
 796              <col>title</col>
 797          </index>
 798          <index name="notes_notesid_idx">
 799              <col>notesid</col>
 800          </index>
 801          <index name="notes_crmid_idx">
 802              <col>crmid</col>
 803          </index>
 804          <opt platform="mysql">Engine=InnoDB</opt>
 805      </table>
 806  
 807      <table name="vtiger_notes" alter="true">
 808          <constraint>ADD CONSTRAINT fk_1_vtiger_notes FOREIGN KEY (notesid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
 809          <opt>Engine=InnoDB</opt>
 810          <data>
 811          </data>
 812      </table>
 813  
 814      <table name="vtiger_potential">
 815          <field name="potentialid" type="I" size="19">
 816              <key />
 817              <default value="0" />
 818          </field>
 819          <field name="potential_no" type="C" size="100">
 820              <notnull />
 821              <unique />
 822          </field>
 823          <field name="related_to" type="I" size="19" />
 824          <field name="potentialname" type="C" size="120">
 825              <notnull />
 826          </field>
 827          <field name="amount" type="N" size="14.2">
 828              <default value="0" />
 829          </field>
 830          <field name="currency" type="C" size="20" />
 831          <field name="closingdate" type="D" />
 832          <field name="typeofrevenue" type="C" size="50" />
 833          <field name="nextstep" type="C" size="100" />
 834          <field name="private" type="I" size="1">
 835              <default value="0" />
 836          </field>
 837          <field name="probability" type="N" size="7.3">
 838              <default value="0" />
 839          </field>
 840          <field name="campaignid" type="I" size="19" />
 841          <field name="sales_stage" type="C" size="200" />
 842          <field name="potentialtype" type="C" size="200" />
 843          <field name="leadsource" type="C" size="200" />
 844          <field name="productid" type="I" size="50" />
 845          <field name="productversion" type="C" size="50" />
 846          <field name="quotationref" type="C" size="50" />
 847          <field name="partnercontact" type="C" size="50" />
 848          <field name="remarks" type="C" size="50" />
 849          <field name="runtimefee" type="I" size="19">
 850              <default value="0" />
 851          </field>
 852          <field name="followupdate" type="D" />
 853          <field name="evaluationstatus" type="C" size="50" />
 854          <field name="description" type="X" />
 855          <field name="forecastcategory" type="I" size="19">
 856              <default value="0" />
 857          </field>
 858          <field name="outcomeanalysis" type="I" size="19">
 859              <default value="0" />
 860          </field>
 861  
 862          <index name="potential_relatedto_idx">
 863              <col>related_to</col>
 864          </index>
 865          <index name="potentail_sales_stage_idx">
 866              <col>sales_stage</col>
 867          </index>
 868          <index name="potentail_sales_stage_amount_idx">
 869              <col>amount</col>
 870              <col>sales_stage</col>
 871          </index>
 872          <opt platform="mysql">Engine=InnoDB</opt>
 873      </table>
 874  
 875      <table name="vtiger_potential" alter="true">
 876          <constraint>ADD CONSTRAINT fk_1_vtiger_potential FOREIGN KEY (potentialid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
 877          <opt>Engine=InnoDB</opt>
 878          <data>
 879          </data>
 880      </table>
 881  
 882      <table name="vtiger_potstagehistory">
 883          <field name="historyid" type="I" size="19">
 884              <key />
 885              <autoincrement />
 886          </field>
 887          <field name="potentialid" type="I" size="19">
 888              <notnull />
 889          </field>
 890          <field name="amount" type="N" />
 891          <field name="stage" type="C" size="100" />
 892          <field name="probability" type="N" size="7.3" />
 893          <field name="expectedrevenue" type="N" />
 894          <field name="closedate" type="D" />
 895          <field name="lastmodified" type="T" />
 896  
 897          <index name="potstagehistory_potentialid_idx">
 898              <col>potentialid</col>
 899          </index>
 900          <opt platform="mysql">Engine=InnoDB</opt>
 901      </table>
 902  
 903      <table name="vtiger_potstagehistory" alter="true">
 904          <constraint>ADD CONSTRAINT fk_1_vtiger_potstagehistory FOREIGN KEY (potentialid) REFERENCES vtiger_potential(potentialid) ON DELETE CASCADE</constraint>
 905          <opt>Engine=InnoDB</opt>
 906          <data>
 907          </data>
 908      </table>
 909  
 910      <table name="vtiger_potentialscf">
 911          <field name="potentialid" type="I" size="19">
 912              <key />
 913              <default value="0" />
 914          </field>
 915  
 916          <opt platform="mysql">Engine=InnoDB</opt>
 917      </table>
 918  
 919      <table name="vtiger_potentialscf" alter="true">
 920          <constraint>ADD CONSTRAINT fk_1_vtiger_potentialscf FOREIGN KEY (potentialid) REFERENCES vtiger_potential(potentialid) ON DELETE CASCADE</constraint>
 921          <opt>Engine=InnoDB</opt>
 922          <data>
 923          </data>
 924      </table>
 925  
 926      <table name="vtiger_activity">
 927          <field name="activityid" type="I" size="19">
 928              <key />
 929              <default value="0" />
 930          </field>
 931          <field name="subject" type="C" size="100">
 932              <notnull />
 933          </field>
 934          <field name="semodule" type="C" size="20" />
 935          <field name="activitytype" type="C" size="200">
 936              <notnull />
 937          </field>
 938  
 939          <field name="date_start" type="D">
 940              <notnull />
 941          </field>
 942          <field name="due_date" type="D" />
 943          <field name="time_start" type="C" size="50" />
 944          <field name="time_end" type="C" size="50" />
 945          <field name="sendnotification" type="C" size="3">
 946              <notnull />
 947              <default value="0"/>
 948          </field>
 949          <field name="duration_hours" type="C" size="200" />
 950          <field name="duration_minutes" type="C" size="200" />
 951          <field name="status" type="C" size="200" />
 952          <field name="eventstatus" type="C" size="200" />
 953          <field name="priority" type="C" size="200" />
 954          <field name="location" type="C" size="150" />
 955          <field name="notime" type="C" size="3">
 956              <notnull />
 957              <default value="0" />
 958          </field>
 959          <field name="visibility" type="C" size="50">
 960              <notnull />
 961              <default value="all" />
 962          </field>
 963          <field name="recurringtype" type="C" size="200" />
 964  
 965          <index name="activity_activityid_subject_idx">
 966              <col>activityid</col>
 967              <col>subject</col>
 968          </index>
 969          <index name="activity_activitytype_date_start_idx">
 970              <col>activitytype</col>
 971              <col>date_start</col>
 972          </index>
 973          <index name="activity_date_start_due_date_idx">
 974              <col>date_start</col>
 975              <col>due_date</col>
 976          </index>
 977          <index name="activity_date_start_time_start_idx">
 978              <col>date_start</col>
 979              <col>time_start</col>
 980          </index>
 981          <index name="activity_eventstatus_idx">
 982              <col>eventstatus</col>
 983          </index>
 984          <index name="activity_status_idx">
 985              <col>status</col>
 986          </index>
 987          <opt platform="mysql">Engine=InnoDB</opt>
 988      </table>
 989  
 990      <table name="vtiger_activity" alter="true">
 991          <constraint>ADD CONSTRAINT fk_1_vtiger_activity FOREIGN KEY (activityid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
 992          <opt>Engine=InnoDB</opt>
 993          <data>
 994          </data>
 995      </table>
 996  
 997      <table name="vtiger_attachments">
 998          <field name="attachmentsid" type="I" size="19">
 999              <key />
1000          </field>
1001          <field name="name" type="C" size="255">
1002              <notnull />
1003          </field>
1004          <field name="description" type="X" />
1005          <field name="type" type="C" size="100" />
1006          <field name="path" type="X" />
1007          <field name="subject" type="C" size="255" />
1008          <index name="attachments_attachmentsid_idx">
1009              <col>attachmentsid</col>
1010          </index>
1011          <opt platform="mysql">Engine=InnoDB</opt>
1012      </table>
1013  
1014      <table name="vtiger_attachments" alter="true">
1015          <constraint>ADD CONSTRAINT fk_1_vtiger_attachments FOREIGN KEY (attachmentsid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1016          <opt>Engine=InnoDB</opt>
1017          <data>
1018          </data>
1019      </table>
1020  
1021      <table name="vtiger_seattachmentsrel">
1022          <field name="crmid" type="I" size="19">
1023              <key />
1024              <default value="0" />
1025          </field>
1026          <field name="attachmentsid" type="I" size="19">
1027              <key />
1028              <default value="0" />
1029          </field>
1030  
1031          <index name="seattachmentsrel_attachmentsid_idx">
1032              <col>attachmentsid</col>
1033          </index>
1034          <index name="seattachmentsrel_crmid_idx">
1035              <col>crmid</col>
1036          </index>
1037          <index name="seattachmentsrel_attachmentsid_crmid_idx">
1038              <col>attachmentsid</col>
1039              <col>crmid</col>
1040          </index>
1041          <opt platform="mysql">Engine=InnoDB</opt>
1042      </table>
1043  
1044      <table name="vtiger_seattachmentsrel" alter="true">
1045          <constraint>ADD CONSTRAINT fk_1_vtiger_seattachmentsrel FOREIGN KEY (attachmentsid) REFERENCES vtiger_attachments(attachmentsid) ON DELETE CASCADE</constraint>
1046          <constraint>ADD CONSTRAINT fk_2_vtiger_seattachmentsrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1047          <opt>Engine=InnoDB</opt>
1048          <data>
1049          </data>
1050      </table>
1051  
1052      <table name="vtiger_tracker">
1053          <field name="id" type="I" size="11">
1054              <key />
1055              <autoincrement />
1056          </field>
1057          <field name="user_id" type="C" size="36" />
1058          <field name="module_name" type="C" size="25" />
1059          <field name="item_id" type="C" size="36" />
1060          <field name="item_summary" type="C" size="255" />
1061  
1062          <opt platform="mysql">Engine=InnoDB</opt>
1063      </table>
1064  
1065      <table name="vtiger_vendor">
1066          <field name="vendorid" type="I" size="19">
1067              <key />
1068              <notnull />
1069              <default value="0" />
1070          </field>
1071          <field name="vendor_no" type="C" size="100">
1072              <notnull />
1073              <unique />
1074          </field>
1075          <field name="vendorname" type="C" size="100" />
1076          <field name="phone" type="C" size="100" />
1077          <field name="email" type="C" size="100" />
1078          <field name="website" type="C" size="100" />
1079          <field name="glacct" type="C" size="200" />
1080          <field name="category" type="C" size="50" />
1081          <field name="street" type="X" />
1082          <field name="city" type="C" size="30" />
1083          <field name="state" type="C" size="30" />
1084          <field name="pobox" type="C" size="30" />
1085          <field name="postalcode" type="C" size="100" />
1086          <field name="country" type="C" size="100" />
1087          <field name="description" type="X" />
1088  
1089          <opt platform="mysql">Engine=InnoDB</opt>
1090      </table>
1091  
1092      <table name="vtiger_vendor" alter="true">
1093          <constraint>ADD CONSTRAINT fk_1_vtiger_vendor FOREIGN KEY (vendorid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1094          <opt>Engine=InnoDB</opt>
1095          <data>
1096          </data>
1097      </table>
1098  
1099      <table name="vtiger_products">
1100          <field name="productid" type="I" size="11">
1101              <key />
1102          </field>
1103          <field name="product_no" type="C" size="100">
1104              <notnull />
1105              <unique />
1106          </field>
1107          <field name="productname" type="C" size="50">
1108              <notnull />
1109          </field>
1110          <field name="productcode" type="C" size="40" />
1111          <field name="productcategory" type="C" size="200" />
1112          <field name="manufacturer" type="C" size="200" />
1113          <field name="qty_per_unit" type="N" size="11.2">
1114              <default value="0" />
1115          </field>
1116          <field name="unit_price" type="N" size="25.2" />
1117          <field name="weight" type="N" size="11.3" />
1118          <field name="pack_size" type="I" size="11" />
1119          <field name="sales_start_date" type="D" />
1120          <field name="sales_end_date" type="D" />
1121          <field name="start_date" type="D" />
1122          <field name="expiry_date" type="D" />
1123          <field name="cost_factor" type="I" size="11" />
1124          <field name="commissionrate" type="N" size="7.3" />
1125          <field name="commissionmethod" type="C" size="50" />
1126          <field name="discontinued" type="I" size="1">
1127              <notnull />
1128              <default value="0" />
1129          </field>
1130          <field name="usageunit" type="C" size="200" />
1131          <field name="reorderlevel" type="I" size="11" />
1132          <field name="website" type="C" size="100" />
1133          <field name="taxclass" type="C" size="200" />
1134          <field name="mfr_part_no" type="C" size="200" />
1135          <field name="vendor_part_no" type="C" size="200" />
1136          <field name="serialno" type="C" size="200" />
1137          <field name="qtyinstock" type="N" size="25.3" />
1138          <field name="productsheet" type="C" size="200" />
1139          <field name="qtyindemand" type="I" size="11" />
1140          <field name="glacct" type="C" size="200" />
1141          <field name="vendor_id" type="I" size="11" />
1142          <field name="imagename" type="X" />
1143          <field name="currency_id" type="I" size="19">
1144              <notnull />
1145              <default value="1" />
1146          </field>
1147          <opt platform="mysql">Engine=InnoDB</opt>
1148      </table>
1149  
1150      <table name="vtiger_products" alter="true">
1151          <constraint>ADD CONSTRAINT fk_1_vtiger_products FOREIGN KEY (productid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1152          <opt>Engine=InnoDB</opt>
1153          <data>
1154          </data>
1155      </table>
1156  
1157      <table name="vtiger_currency">
1158          <field name="currencyid" type="I" size="19">
1159              <key />
1160              <autoincrement />
1161          </field>
1162          <field name="currency" type="C" size="200">
1163              <notnull />
1164          </field>
1165          <field name="sortorderid" type="I" size="19">
1166              <notnull />
1167              <default value="0" />
1168          </field>
1169          <field name="presence" type="I" size="1">
1170              <notnull />
1171              <default value="1" />
1172          </field>
1173  
1174          <index name="currency_currency_idx">
1175              <unique />
1176              <col>currency</col>
1177          </index>
1178          <opt platform="mysql">Engine=InnoDB</opt>
1179      </table>
1180  
1181      <table name="vtiger_visibility">
1182          <field name="visibilityid" type="I" size="19">
1183              <key />
1184              <autoincrement />
1185          </field>
1186          <field name="visibility" type="C" size="200">
1187              <notnull />
1188          </field>
1189          <field name="sortorderid" type="I" size="19">
1190              <notnull />
1191              <default value="0"/>
1192          </field>
1193          <field name="presence" type="I" size="1">
1194              <notnull />
1195              <default value="1"/>
1196          </field>
1197  
1198          <index name="visibility_visibility_idx">
1199              <col>visibility</col>
1200              <unique />
1201          </index>
1202          <opt platform="mysql">Engine=InnoDB</opt>
1203      </table>
1204  
1205      <table name="vtiger_manufacturer">
1206          <field name="manufacturerid" type="I" size="19">
1207              <key />
1208              <autoincrement />
1209          </field>
1210          <field name="manufacturer" type="C" size="200">
1211              <notnull />
1212          </field>
1213          <field name="presence" type="I" size="1">
1214              <notnull />
1215              <default value="1" />
1216          </field>
1217          <field name="picklist_valueid" type="I" size="19">
1218              <notnull />
1219              <default value="0" />
1220          </field>
1221          <field name="sortorderid" type="I" size="11"></field>
1222          <index name="manufacturer_manufacturer_idx">
1223              <unique />
1224              <col>manufacturer</col>
1225          </index>
1226          <opt platform="mysql">Engine=InnoDB</opt>
1227      </table>
1228  
1229      <table name="vtiger_role">
1230          <field name="roleid" type="C" size="255">
1231              <key />
1232          </field>
1233          <field name="rolename" type="C" size="200" />
1234          <field name="parentrole" type="C" size="255" />
1235          <field name="depth" type="I" size="19" />
1236  
1237          <opt platform="mysql">Engine=InnoDB</opt>
1238      </table>
1239  
1240      <table name="vtiger_user2role">
1241          <field name="userid" type="I" size="11">
1242              <key />
1243          </field>
1244          <field name="roleid" type="C" size="255">
1245              <notnull />
1246          </field>
1247  
1248          <index name="user2role_roleid_idx">
1249              <col>roleid</col>
1250          </index>
1251          <opt platform="mysql">Engine=InnoDB</opt>
1252      </table>
1253  
1254      <table name="vtiger_user2role" alter="true">
1255          <constraint>ADD CONSTRAINT fk_1_vtiger_user2role FOREIGN KEY (roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
1256          <constraint>ADD CONSTRAINT fk_2_vtiger_user2role FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
1257          <opt>Engine=InnoDB</opt>
1258          <data>
1259          </data>
1260      </table>
1261  
1262      <table name="vtiger_groups">
1263          <field name="groupid" type="I" size="19">
1264              <key />
1265          </field>
1266          <field name="groupname" type="C" size="100" />
1267          <field name="description" type="X" />
1268  
1269          <index name="groups_groupname_idx">
1270              <col>groupname</col>
1271              <unique />
1272          </index>
1273          <opt platform="mysql">Engine=InnoDB</opt>
1274      </table>
1275  
1276      <table name="vtiger_users2group">
1277          <field name="groupid" type="I" size="19">
1278              <key />
1279          </field>
1280          <field name="userid" type="I" size="19">
1281              <key />
1282          </field>
1283  
1284          <index name="users2group_groupname_uerid_idx">
1285              <col>groupid</col>
1286              <col>userid</col>
1287          </index>
1288          <opt platform="mysql">Engine=InnoDB</opt>
1289      </table>
1290  
1291      <table name="vtiger_users2group" alter="true">
1292          <constraint>ADD CONSTRAINT fk_1_vtiger_users2group FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
1293          <constraint>ADD CONSTRAINT fk_2_vtiger_users2group FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
1294          <opt>Engine=InnoDB</opt>
1295          <data>
1296          </data>
1297      </table>
1298  
1299      <table name="vtiger_group2grouprel">
1300          <field name="groupid" type="I" size="19">
1301              <key />
1302          </field>
1303          <field name="containsgroupid" type="I" size="19">
1304              <key />
1305          </field>
1306  
1307          <opt platform="mysql">Engine=InnoDB</opt>
1308      </table>
1309  
1310      <table name="vtiger_group2grouprel" alter="true">
1311          <constraint>ADD CONSTRAINT fk_1_vtiger_group2grouprel FOREIGN KEY (containsgroupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
1312          <constraint>ADD CONSTRAINT fk_2_vtiger_group2grouprel FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
1313          <opt>Engine=InnoDB</opt>
1314          <data>
1315          </data>
1316      </table>
1317  
1318      <table name="vtiger_group2role">
1319          <field name="groupid" type="I" size="19">
1320              <key />
1321          </field>
1322          <field name="roleid" type="C" size="255">
1323              <key />
1324          </field>
1325          <opt platform="mysql">Engine=InnoDB</opt>
1326      </table>
1327  
1328      <table name="vtiger_group2role" alter="true">
1329          <constraint>ADD CONSTRAINT fk_1_vtiger_group2role FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
1330          <constraint>ADD CONSTRAINT fk_2_vtiger_group2role FOREIGN KEY (roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
1331          <opt>Engine=InnoDB</opt>
1332          <data>
1333          </data>
1334      </table>
1335  
1336      <table name="vtiger_group2rs">
1337          <field name="groupid" type="I" size="19">
1338              <key />
1339          </field>
1340          <field name="roleandsubid" type="C" size="255">
1341              <key />
1342          </field>
1343          <opt platform="mysql">Engine=InnoDB</opt>
1344      </table>
1345  
1346      <table name="vtiger_group2rs" alter="true">
1347          <constraint>ADD CONSTRAINT fk_1_vtiger_group2rs FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
1348          <constraint>ADD CONSTRAINT fk_2_vtiger_group2rs FOREIGN KEY (roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
1349          <opt>Engine=InnoDB</opt>
1350          <data>
1351          </data>
1352      </table>
1353  
1354      <table name="vtiger_campaign">
1355          <field name="campaign_no" type="C" size="100">
1356              <notnull />
1357              <unique />
1358          </field>
1359          <field name="campaignname" type="C" size="255" />
1360          <field name="campaigntype" type="C" size="200" />
1361          <field name="campaignstatus" type="C" size="200" />
1362          <field name="expectedrevenue" type="N" size="25.3" />
1363          <field name="budgetcost" type="N" size="25.3" />
1364          <field name="actualcost" type="N" size="25.3" />
1365          <field name="expectedresponse" type="C" size="200" />
1366          <field name="numsent" type="N" size="11.0" />
1367          <field name="product_id" type="I" size="19" />
1368          <field name="sponsor" type="C" size="255" />
1369          <field name="targetaudience" type="C" size="255" />
1370          <field name="targetsize" type="I" size="19" />
1371          <field name="expectedresponsecount" type="I" size="19" />
1372          <field name="expectedsalescount" type="I" size="19" />
1373          <field name="expectedroi" type="N" size="25.3" />
1374          <field name="actualresponsecount" type="I" size="19" />
1375          <field name="actualsalescount" type="I" size="19" />
1376          <field name="actualroi" type="N" size="25.3" />
1377          <field name="campaignid" type="I" size="19">
1378              <key />
1379          </field>
1380          <field name="closingdate" type="D" />
1381  
1382          <index name="campaign_campaignstatus_idx">
1383              <col>campaignstatus</col>
1384          </index>
1385          <index name="campaign_campaignname_idx">
1386              <col>campaignname</col>
1387          </index>
1388          <index name="campaign_campaignid_idx">
1389              <col>campaignid</col>
1390          </index>
1391          <opt platform="mysql">Engine=InnoDB</opt>
1392      </table>
1393  
1394      <table name="vtiger_campaignscf">
1395          <field name="campaignid" type="I" size="19">
1396              <key />
1397              <default value="0" />
1398          </field>
1399  
1400          <opt platform="mysql">Engine=InnoDB</opt>
1401      </table>
1402  
1403      <table name="vtiger_campaignscf" alter="true">
1404          <constraint>ADD CONSTRAINT fk_1_vtiger_campaignscf FOREIGN KEY (campaignid) REFERENCES vtiger_campaign(campaignid) ON DELETE CASCADE</constraint>
1405          <opt>Engine=InnoDB</opt>
1406          <data>
1407          </data>
1408      </table>
1409  
1410      <table name="vtiger_campaigncontrel">
1411          <field name="campaignid" type="I" size="19">
1412              <key />
1413              <default value="0"/>
1414          </field>
1415          <field name="contactid" type="I" size="19">
1416              <key />
1417              <notnull />
1418              <default value="0"/>
1419          </field>
1420          <field name="campaignrelstatusid" type="I" size="19">
1421              <key />
1422              <notnull />
1423              <default value="0"/>
1424          </field>
1425  
1426          <index name="campaigncontrel_contractid_idx">
1427              <col>contactid</col>
1428          </index>
1429          <opt platform="mysql">Engine=InnoDB</opt>
1430      </table>
1431  
1432      <table name="vtiger_campaigncontrel" alter="true">
1433          <constraint>ADD CONSTRAINT fk_1_vtiger_campaigncontrel FOREIGN KEY (campaignid) REFERENCES vtiger_campaign(campaignid) ON DELETE CASCADE</constraint>
1434          <constraint>ADD CONSTRAINT fk_2_vtiger_campaigncontrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
1435          <opt>Engine=InnoDB</opt>
1436          <data>
1437          </data>
1438      </table>
1439  
1440      <table name="vtiger_campaignleadrel">
1441          <field name="campaignid" type="I" size="19">
1442              <key />
1443              <default value="0" />
1444          </field>
1445          <field name="leadid" type="I" size="19">
1446              <key />
1447              <notnull />
1448              <default value="0" />
1449          </field>
1450          <field name="campaignrelstatusid" type="I" size="19">
1451              <key />
1452              <default value="0" />
1453          </field>
1454          <index name="campaignleadrel_leadid_campaignid_idx">
1455              <col>leadid</col>
1456              <col>campaignid</col>
1457          </index>
1458          <opt platform="mysql">Engine=InnoDB</opt>
1459      </table>
1460  
1461      <table name="vtiger_campaignleadrel" alter="true">
1462          <constraint>ADD CONSTRAINT fk_1_vtiger_campaignleadrel FOREIGN KEY (campaignid) REFERENCES vtiger_campaign(campaignid) ON DELETE CASCADE</constraint>
1463          <constraint>ADD CONSTRAINT fk_2_vtiger_campaignleadrel FOREIGN KEY (leadid) REFERENCES vtiger_leaddetails(leadid) ON DELETE CASCADE</constraint>
1464          <opt>Engine=InnoDB</opt>
1465          <data>
1466          </data>
1467      </table>
1468  
1469      <table name="vtiger_contpotentialrel">
1470          <field name="contactid" type="I" size="19">
1471              <key />
1472              <notnull />
1473              <default value="0" />
1474          </field>
1475          <field name="potentialid" type="I" size="19">
1476              <key />
1477              <default value="0" />
1478          </field>
1479  
1480          <index name="contpotentialrel_potentialid_idx">
1481              <col>potentialid</col>
1482          </index>
1483          <index name="contpotentialrel_contactid_idx">
1484              <col>contactid</col>
1485          </index>
1486          <opt platform="mysql">Engine=InnoDB</opt>
1487      </table>
1488  
1489      <table name="vtiger_contpotentialrel" alter="true">
1490          <constraint>ADD CONSTRAINT fk_1_vtiger_contpotentialrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
1491          <constraint>ADD CONSTRAINT fk_2_vtiger_contpotentialrel FOREIGN KEY (potentialid) REFERENCES vtiger_potential(potentialid) ON DELETE CASCADE</constraint>
1492          <opt>Engine=InnoDB</opt>
1493          <data>
1494          </data>
1495      </table>
1496  
1497      <table name="vtiger_cntactivityrel">
1498          <field name="contactid" type="I" size="19">
1499              <key />
1500              <notnull />
1501              <default value="0" />
1502          </field>
1503          <field name="activityid" type="I" size="19">
1504              <key />
1505              <default value="0" />
1506          </field>
1507  
1508          <index name="cntactivityrel_contactid_idx">
1509              <col>contactid</col>
1510          </index>
1511          <index name="cntactivityrel_activityid_idx">
1512              <col>activityid</col>
1513          </index>
1514          <opt platform="mysql">Engine=InnoDB</opt>
1515      </table>
1516  
1517      <table name="vtiger_cntactivityrel" alter="true">
1518          <constraint>ADD CONSTRAINT fk_1_vtiger_cntactivityrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
1519          <constraint>ADD CONSTRAINT fk_2_vtiger_cntactivityrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
1520          <opt>Engine=InnoDB</opt>
1521          <data>
1522          </data>
1523      </table>
1524  
1525      <table name="vtiger_troubletickets">
1526          <field name="ticketid" type="I" size="19">
1527              <key />
1528          </field>
1529          <field name="ticket_no" type="C" size="100">
1530              <notnull />
1531              <unique />
1532          </field>
1533          <field name="groupname" type="C" size="100" />
1534          <field name="parent_id" type="C" size="100" />
1535          <field name="product_id" type="C" size="100" />
1536          <field name="priority" type="C" size="200" />
1537          <field name="severity" type="C" size="200" />
1538          <field name="status" type="C" size="200" />
1539          <field name="category" type="C" size="200" />
1540          <field name="title" type="C" size="255">
1541              <notnull />
1542          </field>
1543          <field name="solution" type="X" />
1544          <field name="update_log" type="X" />
1545          <field name="version_id" type="I" size="11" />
1546          <field name="hours" type="C" size="200" />
1547          <field name="days" type="C" size="200" />
1548          <index name="troubletickets_ticketid_idx">
1549              <col>ticketid</col>
1550          </index>
1551          <index name="troubletickets_status_idx">
1552              <col>status</col>
1553          </index>
1554          <opt platform="mysql">Engine=InnoDB</opt>
1555      </table>
1556  
1557      <table name="vtiger_troubletickets" alter="true">
1558          <constraint>ADD CONSTRAINT fk_1_vtiger_troubletickets FOREIGN KEY (ticketid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1559          <opt>Engine=InnoDB</opt>
1560          <data>
1561          </data>
1562      </table>
1563  
1564      <table name="vtiger_ticketcomments">
1565          <field name="commentid" type="I" size="19">
1566              <key />
1567              <autoincrement />
1568          </field>
1569          <field name="ticketid" type="I" size="19">
1570          </field>
1571          <field name="comments" type="X" />
1572          <field name="ownerid" type="I" size="19">
1573              <notnull />
1574              <default value="0" />
1575          </field>
1576          <field name="ownertype" type="C" size="10" />
1577          <field name="createdtime" type="T" >
1578              <notnull />
1579          </field>
1580  
1581          <index name="ticketcomments_ticketid_idx">
1582              <col>ticketid</col>
1583          </index>
1584          <opt platform="mysql">Engine=InnoDB</opt>
1585      </table>
1586  
1587      <table name="vtiger_ticketcomments" alter="true">
1588          <constraint>ADD CONSTRAINT fk_1_vtiger_ticketcomments FOREIGN KEY (ticketid) REFERENCES vtiger_troubletickets(ticketid) ON DELETE CASCADE</constraint>
1589          <opt>Engine=InnoDB</opt>
1590          <data>
1591          </data>
1592      </table>
1593  
1594      <table name="vtiger_salesmanactivityrel">
1595          <field name="smid" type="I" size="19">
1596              <key />
1597              <default value="0" />
1598          </field>
1599          <field name="activityid" type="I" size="19">
1600              <key />
1601              <default value="0" />
1602          </field>
1603  
1604          <index name="salesmanactivityrel_activityid_idx">
1605              <col>activityid</col>
1606          </index>
1607          <index name="salesmanactivityrel_smid_idx">
1608              <col>smid</col>
1609          </index>
1610          <opt platform="mysql">Engine=InnoDB</opt>
1611      </table>
1612  
1613      <table name="vtiger_salesmanactivityrel" alter="true">
1614          <constraint>ADD CONSTRAINT fk_1_vtiger_salesmanactivityrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
1615          <constraint>ADD CONSTRAINT fk_2_vtiger_salesmanactivityrel FOREIGN KEY (smid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
1616          <opt>Engine=InnoDB</opt>
1617          <data>
1618          </data>
1619      </table>
1620  
1621      <table name="vtiger_vendorcontactrel">
1622          <field name="vendorid" type="I" size="19">
1623              <key />
1624              <default value="0" />
1625          </field>
1626          <field name="contactid" type="I" size="19">
1627              <key />
1628              <default value="0" />
1629          </field>
1630  
1631          <index name="vendorcontactrel_vendorid_idx">
1632              <col>vendorid</col>
1633          </index>
1634          <index name="vendorcontactrel_contact_idx">
1635              <col>contactid</col>
1636          </index>
1637          <opt platform="mysql">Engine=InnoDB</opt>
1638      </table>
1639  
1640      <table name="vtiger_vendorcontactrel" alter="true">
1641          <constraint>ADD CONSTRAINT fk_1_vtiger_vendorcontactrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
1642          <constraint>ADD CONSTRAINT fk_2_vtiger_vendorcontactrel FOREIGN KEY (vendorid) REFERENCES vtiger_vendor(vendorid) ON DELETE CASCADE</constraint>
1643          <opt>Engine=InnoDB</opt>
1644          <data>
1645          </data>
1646      </table>
1647  
1648      <table name="vtiger_salesmanticketrel">
1649          <field name="smid" type="I" size="19">
1650              <key />
1651              <default value="0" />
1652          </field>
1653          <field name="id" type="I" size="19">
1654              <key />
1655              <default value="0" />
1656          </field>
1657  
1658          <index name="salesmanticketrel_smid_idx">
1659              <col>smid</col>
1660          </index>
1661          <index name="salesmanticketrel_id_idx">
1662              <col>id</col>
1663          </index>
1664          <opt platform="mysql">Engine=InnoDB</opt>
1665      </table>
1666  
1667      <table name="vtiger_salesmanticketrel" alter="true">
1668          <constraint>ADD CONSTRAINT fk_1_vtiger_salesmanticketrel FOREIGN KEY (id) REFERENCES vtiger_troubletickets(ticketid) ON DELETE CASCADE</constraint>
1669          <constraint>ADD CONSTRAINT fk_2_vtiger_salesmanticketrel FOREIGN KEY (smid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
1670          <opt>Engine=InnoDB</opt>
1671          <data>
1672          </data>
1673      </table>
1674  
1675      <table name="vtiger_seactivityrel">
1676          <field name="crmid" type="I" size="19">
1677              <key />
1678          </field>
1679          <field name="activityid" type="I" size="19">
1680              <key />
1681          </field>
1682  
1683          <index name="seactivityrel_activityid_idx">
1684              <col>activityid</col>
1685          </index>
1686          <index name="seactivityrel_crmid_idx">
1687              <col>crmid</col>
1688          </index>
1689          <opt platform="mysql">Engine=InnoDB</opt>
1690      </table>
1691  
1692      <table name="vtiger_seactivityrel" alter="true">
1693          <constraint>ADD CONSTRAINT fk_1_vtiger_seactivityrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
1694          <constraint>ADD CONSTRAINT fk_2_vtiger_seactivityrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1695          <opt>Engine=InnoDB</opt>
1696          <data>
1697          </data>
1698      </table>
1699  
1700      <table name="vtiger_seproductsrel">
1701          <field name="crmid" type="I" size="19">
1702              <key />
1703              <default value="0" />
1704          </field>
1705          <field name="productid" type="I" size="19">
1706              <key />
1707              <default value="0" />
1708          </field>
1709          <field name="setype" type="C" size="30">
1710              <notnull />
1711          </field>
1712  
1713          <index name="seproductsrel_productid_idx">
1714              <col>productid</col>
1715          </index>
1716          <index name="seproductrel_crmid_idx">
1717              <col>crmid</col>
1718          </index>
1719          <opt platform="mysql">Engine=InnoDB</opt>
1720      </table>
1721  
1722      <table name="vtiger_seproductsrel" alter="true">
1723          <constraint>ADD CONSTRAINT fk_1_vtiger_seproductsrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1724          <constraint>ADD CONSTRAINT fk_2_vtiger_seproductsrel FOREIGN KEY (productid) REFERENCES vtiger_products(productid) ON DELETE CASCADE</constraint>
1725          <opt>Engine=InnoDB</opt>
1726          <data>
1727          </data>
1728      </table>
1729  
1730      <table name="vtiger_seticketsrel">
1731          <field name="crmid" type="I" size="19">
1732              <key />
1733              <default value="0" />
1734          </field>
1735          <field name="ticketid" type="I" size="19">
1736              <key />
1737              <default value="0" />
1738          </field>
1739  
1740          <index name="seticketsrel_crmid_idx">
1741              <col>crmid</col>
1742          </index>
1743          <index name="seticketsrel_ticketid_idx">
1744              <col>ticketid</col>
1745          </index>
1746          <opt platform="mysql">Engine=InnoDB</opt>
1747      </table>
1748  
1749      <table name="vtiger_seticketsrel" alter="true">
1750          <constraint>ADD CONSTRAINT fk_1_vtiger_seticketsrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1751          <constraint>ADD CONSTRAINT fk_2_vtiger_seticketsrel FOREIGN KEY (ticketid) REFERENCES vtiger_troubletickets(ticketid) ON DELETE CASCADE</constraint>
1752          <opt>Engine=InnoDB</opt>
1753          <data>
1754          </data>
1755      </table>
1756  
1757      <table name="vtiger_import_maps">
1758          <field name="id" type="I" size="19">
1759              <key />
1760              <autoincrement />
1761          </field>
1762          <field name="name" type="C" size="36">
1763              <notnull />
1764          </field>
1765          <field name="module" type="C" size="36">
1766              <notnull />
1767          </field>
1768          <field name="content" type="B" />
1769          <field name="has_header" type="I" size="1">
1770              <notnull />
1771              <default value="1" />
1772          </field>
1773          <field name="deleted" type="I" size="1">
1774              <notnull />
1775              <default value="0" />
1776          </field>
1777          <field name="date_entered" type="T">
1778              <notnull />
1779              <deftimestamp />
1780          </field>
1781          <field name="date_modified" type="T">
1782              <notnull />
1783              <deftimestamp />
1784          </field>
1785          <field name="assigned_user_id" type="C" size="36" />
1786          <field name="is_published" type="C" size="3">
1787              <notnull />
1788              <default value="no" />
1789          </field>
1790          <index name="import_maps_assigned_user_id_module_name_deleted_idx">
1791              <col>assigned_user_id</col>
1792              <col>module</col>
1793              <col>name</col>
1794              <col>deleted</col>
1795          </index>
1796          <opt platform="mysql">Engine=InnoDB</opt>
1797      </table>
1798  
1799      <table name="vtiger_systems">
1800          <field name="id" type="I" size="19">
1801              <key />
1802          </field>
1803          <field name="server" type="C" size="100" />
1804          <field name="server_port" type="I" size="19" />
1805          <field name="server_username" type="C" size="100" />
1806          <field name="server_password" type="C" size="100" />
1807          <field name="server_type" type="C" size="20" />
1808          <field name="smtp_auth" type="C" size="5" />
1809          <field name="server_path" type="C" size="256" />
1810          <field name="from_email_field" type="C" size="50" />
1811          <opt platform="mysql">Engine=InnoDB</opt>
1812      </table>
1813  
1814      <table name="vtiger_currency_info">
1815          <field name="id" type="I" >
1816              <key />
1817              <autoincrement />
1818  
1819          </field>
1820          <field name="currency_name" type="C" size="100" />
1821          <field name="currency_code" type="C" size="100" />
1822          <field name="currency_symbol" type="C" size="30" />
1823          <field name="conversion_rate" type="N" size="10.3" />
1824          <field name="currency_status" type="C" size="25" />
1825          <field name="defaultid" type="C" size="10">
1826              <notnull />
1827              <default value="0" />
1828          </field>
1829          <field name="deleted" type="I" size="1">
1830              <notnull />
1831              <default value="0" />
1832          </field>
1833          <opt platform="mysql">Engine=InnoDB</opt>
1834      </table>
1835  
1836      <table name="vtiger_defaultcv">
1837          <field name="tabid" type="I" size="19">
1838              <key />
1839          </field>
1840          <field name="defaultviewname" type="C" size="50">
1841              <notnull />
1842          </field>
1843          <field name="query" type="X" />
1844          <opt platform="mysql">Engine=InnoDB</opt>
1845      </table>
1846  
1847      <table name="vtiger_defaultcv" alter="true">
1848          <constraint>ADD CONSTRAINT fk_1_vtiger_defaultcv FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
1849          <opt>Engine=InnoDB</opt>
1850          <data>
1851          </data>
1852      </table>
1853  
1854      <table name="vtiger_emailtemplates">
1855          <field name="foldername" type="C" size="100" />
1856          <field name="templatename" type="C" size="100" />
1857          <field name="subject" type="C" size="100" />
1858          <field name="description" type="X" />
1859          <field name="body" type="X" />
1860          <field name="deleted" type="I" size="1">
1861              <notnull />
1862              <default value="0" />
1863          </field>
1864          <field name="templateid" type="I" size="19">
1865              <key />
1866              <autoincrement />
1867          </field>
1868  
1869          <index name="emailtemplates_foldernamd_templatename_subject_idx">
1870              <col>foldername</col>
1871              <col>templatename</col>
1872              <col>subject</col>
1873          </index>
1874          <opt platform="mysql">Engine=InnoDB</opt>
1875      </table>
1876  
1877      <table name="vtiger_faq">
1878          <field name="id" type="I" size="11">
1879              <key />
1880              <autoincrement />
1881          </field>
1882          <field name="faq_no" type="C" size="100">
1883              <notnull />
1884              <unique />
1885          </field>
1886          <field name="product_id" type="C" size="100" />
1887          <field name="question" type="X">
1888              <notnull />
1889          </field>
1890          <field name="answer" type="X" />
1891          <field name="category" type="C" size="200">
1892              <notnull />
1893          </field>
1894          <field name="status" type="C" size="200">
1895              <notnull />
1896          </field>
1897  
1898          <index name="faq_id_idx">
1899              <col>id</col>
1900          </index>
1901          <opt platform="mysql">Engine=InnoDB</opt>
1902      </table>
1903  
1904      <table name="vtiger_faq" alter="true">
1905          <constraint>ADD CONSTRAINT fk_1_vtiger_faq FOREIGN KEY (id) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1906          <opt>Engine=InnoDB</opt>
1907          <data>
1908          </data>
1909      </table>
1910  
1911      <table name="vtiger_faqcomments">
1912          <field name="commentid" type="I" size="19">
1913              <key />
1914              <autoincrement />
1915          </field>
1916          <field name="faqid" type="I" size="19">
1917          </field>
1918          <field name="comments" type="X" />
1919          <field name="createdtime" type="T">
1920              <notnull />
1921          </field>
1922  
1923          <index name="faqcomments_faqid_idx">
1924              <col>faqid</col>
1925          </index>
1926          <opt platform="mysql">Engine=InnoDB</opt>
1927      </table>
1928  
1929      <table name="vtiger_faqcomments" alter="true">
1930          <constraint>ADD CONSTRAINT fk_1_vtiger_faqcomments FOREIGN KEY (faqid) REFERENCES vtiger_faq(id) ON DELETE CASCADE</constraint>
1931          <opt>Engine=InnoDB</opt>
1932          <data>
1933          </data>
1934      </table>
1935  
1936      <table name="vtiger_loginhistory">
1937          <field name="login_id" type="I" size="11">
1938              <key />
1939              <autoincrement />
1940          </field>
1941          <field name="user_name" type="C" size="25">
1942              <notnull />
1943          </field>
1944          <field name="user_ip" type="C" size="25">
1945              <notnull />
1946          </field>
1947          <field name="logout_time" type="T">
1948              <deftimestamp />
1949          </field>
1950          <field name="login_time" type="T">
1951              <deftimestamp />
1952          </field>
1953          <field name="status" type="C" size="25" />
1954          <opt platform="mysql">Engine=InnoDB</opt>
1955      </table>
1956  
1957      <table name="vtiger_senotesrel">
1958          <field name="crmid" type="I" size="19">
1959              <key />
1960              <default value="0" />
1961          </field>
1962          <field name="notesid" type="I" size="19">
1963              <key />
1964              <default value="0" />
1965          </field>
1966  
1967          <index name="senotesrel_notesid_idx">
1968              <col>notesid</col>
1969          </index>
1970          <index name="senotesrel_crmid_idx">
1971              <col>crmid</col>
1972          </index>
1973          <opt platform="mysql">Engine=InnoDB</opt>
1974      </table>
1975  
1976      <table name="vtiger_senotesrel" alter="true">
1977          <constraint>ADD CONSTRAINT fk_1_vtiger_senotesrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
1978          <constraint>ADD CONSTRAINT fk_2_vtiger_senotesrel FOREIGN KEY (notesid) REFERENCES vtiger_notes(notesid) ON DELETE CASCADE</constraint>
1979          <opt>Engine=InnoDB</opt>
1980          <data>
1981          </data>
1982      </table>
1983  
1984      <table name="vtiger_ticketcf">
1985          <field name="ticketid" type="I" size="19">
1986              <key />
1987              <default value="0" />
1988          </field>
1989          <field name="from_portal" type="C" size="3" />
1990  
1991          <opt platform="mysql">Engine=InnoDB</opt>
1992      </table>
1993  
1994      <table name="vtiger_ticketcf" alter="true">
1995          <constraint>ADD CONSTRAINT fk_1_vtiger_ticketcf FOREIGN KEY (ticketid) REFERENCES vtiger_troubletickets(ticketid) ON DELETE CASCADE</constraint>
1996          <opt>Engine=InnoDB</opt>
1997          <data>
1998          </data>
1999      </table>
2000  
2001      <table name="vtiger_productcf">
2002          <field name="productid" type="I" size="19">
2003              <key />
2004              <default value="0" />
2005          </field>
2006  
2007          <opt platform="mysql">Engine=InnoDB</opt>
2008      </table>
2009  
2010      <table name="vtiger_productcf" alter="true">
2011          <constraint>ADD CONSTRAINT fk_1_vtiger_productcf FOREIGN KEY (productid) REFERENCES vtiger_products(productid) ON DELETE CASCADE</constraint>
2012          <opt>Engine=InnoDB</opt>
2013          <data>
2014          </data>
2015      </table>
2016  
2017      <table name="vtiger_users_last_import">
2018          <field name="id" type="I" size="36">
2019              <autoincrement />
2020              <key />
2021          </field>
2022          <field name="assigned_user_id" type="C" size="36" />
2023          <field name="bean_type" type="C" size="36" />
2024          <field name="bean_id" type="C" size="36" />
2025          <field name="deleted" type="I" size="1">
2026              <notnull />
2027              <default value="0" />
2028          </field>
2029  
2030          <index name="idx_user_id">
2031              <col>assigned_user_id</col>
2032          </index>
2033          <opt platform="mysql">Engine=InnoDB</opt>
2034      </table>
2035  
2036      <table name="vtiger_wordtemplates">
2037          <field name="templateid" type="I" size="19">
2038              <key />
2039          </field>
2040          <field name="filename" type="C" size="100">
2041              <notnull />
2042          </field>
2043          <field name="module" type="C" size="30">
2044              <notnull />
2045          </field>
2046          <field name="date_entered" type="T">
2047              <notnull />
2048              <deftimestamp />
2049          </field>
2050          <field name="parent_type" type="C" size="50">
2051              <notnull />
2052          </field>
2053          <field name="data" type="B">
2054              <notnull />
2055          </field>
2056          <field name="description" type="X" />
2057          <field name="filesize" type="C" size="50">
2058              <notnull />
2059          </field>
2060          <field name="filetype" type="C" size="20">
2061              <notnull />
2062          </field>
2063          <field name="deleted" type="I" size="1">
2064              <notnull />
2065              <default value="0" />
2066          </field>
2067          <opt platform="mysql">Engine=InnoDB</opt>
2068      </table>
2069  
2070      <table name="vtiger_accountrating">
2071          <field name="accountratingid" type="I" size="19">
2072              <key />
2073              <autoincrement />
2074          </field>
2075          <field name="rating" type="C" size="200">
2076              <notnull />
2077          </field>
2078          <field name="sortorderid" type="I" size="19">
2079              <notnull />
2080              <default value="0" />
2081          </field>
2082          <field name="presence" type="I" size="1">
2083              <notnull />
2084              <default value="1" />
2085          </field>
2086  
2087          <index name="accountrating_rating_idx">
2088              <col>rating</col>
2089              <unique />
2090          </index>
2091          <opt platform="mysql">Engine=InnoDB</opt>
2092      </table>
2093  
2094      <table name="vtiger_accounttype">
2095          <field name="accounttypeid" type="I" size="19">
2096              <key />
2097              <autoincrement />
2098          </field>
2099          <field name="accounttype" type="C" size="200">
2100              <notnull />
2101          </field>
2102          <field name="presence" type="I" size="1">
2103              <notnull />
2104              <default value="1" />
2105          </field>
2106          <field name="picklist_valueid" type="I" size="19">
2107              <notnull />
2108              <default value="0" />
2109          </field>
2110          <field name="sortorderid" type="I" size="11"></field>
2111          <index name="accounttype_accounttype_idx">
2112              <col>accounttype</col>
2113              <unique />
2114          </index>
2115          <opt platform="mysql">Engine=InnoDB</opt>
2116      </table>
2117  
2118      <table name="vtiger_leadsource">
2119          <field name="leadsourceid" type="I" size="19">
2120              <key />
2121              <autoincrement />
2122          </field>
2123          <field name="leadsource" type="C" size="200">
2124              <notnull />
2125          </field>
2126          <field name="presence" type="I" size="1">
2127              <notnull />
2128              <default value="1" />
2129          </field>
2130          <field name="picklist_valueid" type="I" size="19">
2131              <notnull />
2132              <default value="0" />
2133          </field>
2134          <field name="sortorderid" type="I" size="11"></field>
2135          <index name="leadsource_source_idx">
2136              <col>source</col>
2137              <unique />
2138          </index>
2139          <opt platform="mysql">Engine=InnoDB</opt>
2140      </table>
2141  
2142      <table name="vtiger_opportunity_type">
2143          <field name="opptypeid" type="I" size="19">
2144              <key />
2145              <autoincrement />
2146          </field>
2147          <field name="opportunity_type" type="C" size="200">
2148              <notnull />
2149          </field>
2150          <field name="presence" type="I" size="1">
2151              <notnull />
2152              <default value="1" />
2153          </field>
2154          <field name="picklist_valueid" type="I" size="19">
2155              <notnull />
2156              <default value="0" />
2157          </field>
2158          <field name="sortorderid" type="I" size="11"></field>
2159          <index name="opportunity_type_opportunity_type_idx">
2160              <col>opportunity_type</col>
2161              <unique />
2162          </index>
2163          <opt platform="mysql">Engine=InnoDB</opt>
2164      </table>
2165  
2166      <table name="vtiger_leadstage">
2167          <field name="leadstageid" type="I" size="19">
2168              <key />
2169              <autoincrement />
2170          </field>
2171          <field name="stage" type="C" size="200">
2172              <notnull />
2173          </field>
2174          <field name="sortorderid" type="I" size="19">
2175              <notnull />
2176              <default value="0" />
2177          </field>
2178          <field name="presence" type="I" size="1">
2179              <notnull />
2180              <default value="1" />
2181          </field>
2182  
2183          <index name="leadstage_stage_idx">
2184              <col>stage</col>
2185              <unique />
2186          </index>
2187          <opt platform="mysql">Engine=InnoDB</opt>
2188      </table>
2189  
2190      <table name="vtiger_leadstatus">
2191          <field name="leadstatusid" type="I" size="19">
2192              <key />
2193              <autoincrement />
2194          </field>
2195          <field name="leadstatus" type="C" size="200">
2196              <notnull />
2197          </field>
2198          <field name="presence" type="I" size="1">
2199              <notnull />
2200              <default value="1" />
2201          </field>
2202          <field name="picklist_valueid" type="I" size="19">
2203              <notnull />
2204              <default value="0" />
2205          </field>
2206          <field name="sortorderid" type="I" size="11"></field>
2207          <index name="leadstatus_status_idx">
2208              <col>status</col>
2209              <unique />
2210          </index>
2211          <opt platform="mysql">Engine=InnoDB</opt>
2212      </table>
2213  
2214      <table name="vtiger_eventstatus">
2215          <field name="eventstatusid" type="I" size="19">
2216              <key />
2217              <autoincrement />
2218          </field>
2219          <field name="eventstatus" type="C" size="200">
2220              <notnull />
2221          </field>
2222          <field name="presence" type="I" size="1">
2223              <notnull />
2224              <default value="1" />
2225          </field>
2226          <field name="picklist_valueid" type="I" size="19">
2227              <notnull />
2228              <default value="0" />
2229          </field>
2230          <field name="sortorderid" type="I" size="11"></field>
2231          <index name="eventstatus_status_idx">
2232              <col>status</col>
2233              <unique />
2234          </index>
2235          <opt platform="mysql">Engine=InnoDB</opt>
2236      </table>
2237  
2238      <table name="vtiger_duration_minutes">
2239          <field name="minutesid" type="I" size="19">
2240              <key />
2241              <autoincrement />
2242          </field>
2243          <field name="duration_minutes" type="C" size="200">
2244              <notnull />
2245          </field>
2246          <field name="sortorderid" type="I" size="19">
2247              <notnull />
2248              <default value="0" />
2249          </field>
2250          <field name="presence" type="I" size="1">
2251              <notnull />
2252              <default value="1" />
2253          </field>
2254  
2255          <index name="duration_minutes_status_idx">
2256              <col>status</col>
2257              <unique />
2258          </index>
2259          <opt platform="mysql">Engine=InnoDB</opt>
2260      </table>
2261  
2262      <table name="vtiger_opportunitystage">
2263          <field name="potstageid" type="I" size="19">
2264              <key />
2265              <autoincrement />
2266          </field>
2267          <field name="stage" type="C" size="200">
2268              <notnull />
2269          </field>
2270          <field name="sortorderid" type="I" size="19">
2271              <notnull />
2272              <default value="0" />
2273          </field>
2274          <field name="presence" type="I" size="1">
2275              <notnull />
2276              <default value="1" />
2277          </field>
2278          <field name="probability" type="N" size="3.2">
2279              <default value="0" />
2280          </field>
2281  
2282          <index name="opportunitystage_stage_idx">
2283              <col>stage</col>
2284              <unique />
2285          </index>
2286          <opt platform="mysql">Engine=InnoDB</opt>
2287      </table>
2288  
2289      <table name="vtiger_priority">
2290          <field name="priorityid" type="I" size="19">
2291              <key />
2292              <autoincrement />
2293          </field>
2294          <field name="priority" type="C" size="200">
2295              <notnull />
2296          </field>
2297          <field name="sortorderid" type="I" size="19">
2298              <notnull />
2299              <default value="0" />
2300          </field>
2301          <field name="presence" type="I" size="1">
2302              <notnull />
2303              <default value="1" />
2304          </field>
2305  
2306          <index name="priority_priority_idx">
2307              <col>priority</col>
2308              <unique />
2309          </index>
2310          <opt platform="mysql">Engine=InnoDB</opt>
2311      </table>
2312  
2313      <table name="vtiger_industry">
2314          <field name="industryid" type="I" size="19">
2315              <key />
2316              <autoincrement />
2317          </field>
2318          <field name="industry" type="C" size="200">
2319              <notnull />
2320          </field>
2321          <field name="presence" type="I" size="1">
2322              <notnull />
2323              <default value="1" />
2324          </field>
2325          <field name="picklist_valueid" type="I" size="19">
2326              <notnull />
2327              <default value="0" />
2328          </field>
2329          <field name="sortorderid" type="I" size="11"></field>
2330          <index name="industry_industry_idx">
2331              <col>industry</col>
2332              <unique />
2333          </index>
2334          <opt platform="mysql">Engine=InnoDB</opt>
2335      </table>
2336  
2337      <table name="vtiger_salutationtype">
2338          <field name="salutationid" type="I" size="19">
2339              <key />
2340              <autoincrement />
2341          </field>
2342          <field name="salutationtype" type="C" size="200">
2343              <notnull />
2344          </field>
2345          <field name="presence" type="I" size="1">
2346              <notnull />
2347              <default value="1" />
2348          </field>
2349          <field name="picklist_valueid" type="I" size="19">
2350              <notnull />
2351              <default value="0" />
2352          </field>
2353          <field name="sortorderid" type="I" size="11"></field>
2354          <opt platform="mysql">Engine=InnoDB</opt>
2355      </table>
2356  
2357      <table name="vtiger_taskpriority">
2358          <field name="taskpriorityid" type="I" size="19">
2359              <key />
2360              <autoincrement />
2361          </field>
2362          <field name="taskpriority" type="C" size="200" />
2363          <field name="presence" type="I" size="1">
2364              <notnull />
2365              <default value="1" />
2366          </field>
2367          <field name="picklist_valueid" type="I" size="19">
2368              <notnull />
2369              <default value="0" />
2370          </field>
2371          <field name="sortorderid" type="I" size="11"></field>
2372          <opt platform="mysql">Engine=InnoDB</opt>
2373      </table>
2374  
2375      <table name="vtiger_taskstatus">
2376          <field name="taskstatusid" type="I" size="19">
2377              <key />
2378              <autoincrement />
2379          </field>
2380          <field name="taskstatus" type="C" size="200" />
2381          <field name="presence" type="I" size="1">
2382              <notnull />
2383              <default value="1" />
2384          </field>
2385          <field name="picklist_valueid" type="I" size="19">
2386              <notnull />
2387              <default value="0" />
2388          </field>
2389          <field name="sortorderid" type="I" size="11"></field>
2390          <opt platform="mysql">Engine=InnoDB</opt>
2391      </table>
2392  
2393      <table name="vtiger_activitytype">
2394          <field name="activitytypeid" type="I" size="19">
2395              <key />
2396              <autoincrement />
2397          </field>
2398          <field name="activitytype" type="C" size="200">
2399              <notnull />
2400          </field>
2401          <field name="presence" type="I" size="1">
2402              <notnull />
2403              <default value="1" />
2404          </field>
2405          <field name="picklist_valueid" type="I" size="19">
2406              <notnull />
2407              <default value="0" />
2408          </field>
2409          <field name="sortorderid" type="I" size="11"></field>
2410          <index name="activitytype_activitytype_idx">
2411              <col>activitytype</col>
2412              <unique />
2413          </index>
2414          <opt platform="mysql">Engine=InnoDB</opt>
2415      </table>
2416  
2417      <table name="vtiger_sales_stage">
2418          <field name="sales_stage_id" type="I" size="19">
2419              <key />
2420              <autoincrement />
2421          </field>
2422          <field name="sales_stage" type="C" size="200">
2423          </field>
2424          <field name="presence" type="I" size="1">
2425              <notnull />
2426              <default value="1" />
2427          </field>
2428          <field name="picklist_valueid" type="I" size="19">
2429              <notnull />
2430              <default value="0" />
2431          </field>
2432          <field name="sortorderid" type="I" size="11"></field>
2433          <opt platform="mysql">Engine=InnoDB</opt>
2434      </table>
2435  
2436      <table name="vtiger_faqcategories">
2437          <field name="faqcategories_id" type="I" size="19">
2438              <key />
2439              <autoincrement />
2440          </field>
2441          <field name="faqcategories" type="C" size="200" />
2442          <field name="presence" type="I" size="1">
2443              <notnull />
2444              <default value="1" />
2445          </field>
2446          <field name="picklist_valueid" type="I" size="19">
2447              <notnull />
2448              <default value="0" />
2449          </field>
2450          <field name="sortorderid" type="I" size="11"></field>
2451          <opt platform="mysql">Engine=InnoDB</opt>
2452      </table>
2453  
2454      <table name="vtiger_faqstatus">
2455          <field name="faqstatus_id" type="I" size="19">
2456              <key />
2457              <autoincrement />
2458          </field>
2459          <field name="faqstatus" type="C" size="200" />
2460          <field name="presence" type="I" size="1">
2461              <notnull />
2462              <default value="1" />
2463          </field>
2464          <field name="picklist_valueid" type="I" size="19">
2465              <notnull />
2466              <default value="0" />
2467          </field>
2468          <field name="sortorderid" type="I" size="11"></field>
2469          <opt platform="mysql">Engine=InnoDB</opt>
2470      </table>
2471          
2472          <table name="vtiger_faqcf"> 
2473              <field name="faqid" type="I" size="19"> 
2474                      <key /> 
2475                      <default value="0" /> 
2476              </field> 
2477  
2478              <opt platform="mysql">Engine=InnoDB</opt> 
2479          </table> 
2480  
2481          <table name="vtiger_faqcf" alter="true"> 
2482              <constraint>ADD CONSTRAINT fk_1_vtiger_faqcf FOREIGN KEY (faqid) REFERENCES vtiger_faq(id) ON DELETE CASCADE</constraint> 
2483              <opt>Engine=InnoDB</opt> 
2484              <data> 
2485              </data> 
2486          </table> 
2487  
2488      <table name="vtiger_rating">
2489          <field name="rating_id" type="I" size="19">
2490              <key />
2491              <autoincrement />
2492          </field>
2493          <field name="rating" type="C" size="200" />
2494          <field name="presence" type="I" size="1">
2495              <notnull />
2496              <default value="1" />
2497          </field>
2498          <field name="picklist_valueid" type="I" size="19">
2499              <notnull />
2500              <default value="0" />
2501          </field>
2502          <field name="sortorderid" type="I" size="11"></field>
2503          <opt platform="mysql">Engine=InnoDB</opt>
2504      </table>
2505  
2506      <table name="vtiger_ticketcategories">
2507          <field name="ticketcategories_id" type="I" size="19">
2508              <key />
2509              <autoincrement />
2510          </field>
2511          <field name="ticketcategories" type="C" size="200" />
2512          <field name="presence" type="I" size="1">
2513              <notnull />
2514              <default value="0" />
2515          </field>
2516          <field name="picklist_valueid" type="I" size="19">
2517              <notnull />
2518              <default value="0" />
2519          </field>
2520          <field name="sortorderid" type="I" size="11"></field>
2521          <opt platform="mysql">Engine=InnoDB</opt>
2522      </table>
2523  
2524      <table name="vtiger_ticketpriorities">
2525          <field name="ticketpriorities_id" type="I" size="19">
2526              <key />
2527              <autoincrement />
2528          </field>
2529          <field name="ticketpriorities" type="C" size="200" />
2530          <field name="presence" type="I" size="1">
2531              <notnull />
2532              <default value="0" />
2533          </field>
2534          <field name="picklist_valueid" type="I" size="19">
2535              <notnull />
2536              <default value="0" />
2537          </field>
2538          <field name="sortorderid" type="I" size="11"></field>
2539          <opt platform="mysql">Engine=InnoDB</opt>
2540      </table>
2541  
2542      <table name="vtiger_ticketseverities">
2543          <field name="ticketseverities_id" type="I" size="19">
2544              <key />
2545              <autoincrement />
2546          </field>
2547          <field name="ticketseverities" type="C" size="200" />
2548          <field name="presence" type="I" size="1">
2549              <notnull />
2550              <default value="0" />
2551          </field>
2552          <field name="picklist_valueid" type="I" size="19">
2553              <notnull />
2554              <default value="0" />
2555          </field>
2556          <field name="sortorderid" type="I" size="11"></field>
2557          <opt platform="mysql">Engine=InnoDB</opt>
2558      </table>
2559  
2560      <table name="vtiger_ticketstatus">
2561          <field name="ticketstatus_id" type="I" size="19">
2562              <key />
2563              <autoincrement />
2564          </field>
2565          <field name="ticketstatus" type="C" size="200" />
2566          <field name="presence" type="I" size="1">
2567              <notnull />
2568              <default value="0" />
2569          </field>
2570          <field name="picklist_valueid" type="I" size="19">
2571              <notnull />
2572              <default value="0" />
2573          </field>
2574          <field name="sortorderid" type="I" size="11"></field>
2575          <opt platform="mysql">Engine=InnoDB</opt>
2576      </table>
2577  
2578      <table name="vtiger_durationhrs">
2579          <field name="hrsid" type="I" size="19">
2580              <key />
2581              <autoincrement />
2582          </field>
2583          <field name="hrs" type="C" size="50" />
2584          <field name="sortorderid" type="I" size="19">
2585              <notnull />
2586              <default value="0" />
2587          </field>
2588          <field name="presence" type="I" size="1">
2589              <notnull />
2590              <default value="1" />
2591          </field>
2592          <opt platform="mysql">Engine=InnoDB</opt>
2593      </table>
2594  
2595      <table name="vtiger_durationmins">
2596          <field name="minsid" type="I" size="19">
2597              <key />
2598              <autoincrement />
2599          </field>
2600          <field name="mins" type="C" size="50" />
2601          <field name="sortorderid" type="I" size="19">
2602              <notnull />
2603              <default value="0" />
2604          </field>
2605          <field name="presence" type="I" size="1">
2606              <notnull />
2607              <default value="1" />
2608          </field>
2609          <opt platform="mysql">Engine=InnoDB</opt>
2610      </table>
2611  
2612      <table name="vtiger_profile">
2613          <field name="profileid" type="I" size="10">
2614              <key />
2615              <autoincrement />
2616          </field>
2617          <field name="profilename" type="C" size="50">
2618              <notnull />
2619          </field>
2620          <field name="description" type="X" />
2621  
2622          <opt platform="mysql">Engine=InnoDB</opt>
2623      </table>
2624  
2625      <table name="vtiger_profile2globalpermissions">
2626          <field name="profileid" type="I" size="19">
2627              <key />
2628          </field>
2629          <field name="globalactionid" type="I" size="19">
2630              <key />
2631          </field>
2632          <field name="globalactionpermission" type="I" size="19" />
2633  
2634          <index name="idx_profile2globalpermissions">
2635              <col>profileid</col>
2636              <col>globalactionid</col>
2637          </index>
2638          <opt platform="mysql">Engine=InnoDB</opt>
2639      </table>
2640  
2641      <table name="vtiger_profile2globalpermissions" alter="true">
2642          <constraint>ADD CONSTRAINT fk_1_vtiger_profile2globalpermissions FOREIGN KEY (profileid) REFERENCES vtiger_profile(profileid) ON DELETE CASCADE</constraint>
2643          <opt>Engine=InnoDB</opt>
2644          <data>
2645          </data>
2646      </table>
2647  
2648      <table name="vtiger_profile2tab">
2649          <field name="profileid" type="I" size="11" />
2650          <field name="tabid" type="I" size="10" />
2651          <field name="permissions" type="I" size="10">
2652              <notnull />
2653              <default value="0" />
2654          </field>
2655  
2656          <index name="profile2tab_profileid_tabid_idx">
2657              <col>profileid</col>
2658              <col>tabid</col>
2659          </index>
2660          <opt platform="mysql">Engine=InnoDB</opt>
2661      </table>
2662  
2663      <table name="vtiger_profile2standardpermissions">
2664          <field name="profileid" type="I" size="11">
2665              <key />
2666          </field>
2667          <field name="tabid" type="I" size="10">
2668              <key />
2669          </field>
2670          <field name="operation" type="I" size="10">
2671              <key />
2672          </field>
2673          <field name="permissions" type="I" size="1" />
2674  
2675          <index name="profile2standardpermissions_profileid_tabid_operation_idx">
2676              <col>profileid</col>
2677              <col>tabid</col>
2678              <col>operation</col>
2679          </index>
2680          <opt platform="mysql">Engine=InnoDB</opt>
2681      </table>
2682  
2683      <table name="vtiger_profile2field">
2684          <field name="profileid" type="I" size="11">
2685              <key />
2686          </field>
2687          <field name="tabid" type="I" size="10" />
2688          <field name="fieldid" type="I" size="19">
2689              <key />
2690          </field>
2691          <field name="visible" type="I" size="19" />
2692          <field name="readonly" type="I" size="19" />
2693  
2694          <index name="profile2field_profileid_tabid_fieldname_idx">
2695              <col>profileid</col>
2696              <col>tabid</col>
2697              <col>fieldname</col>
2698          </index>
2699          <index name="profile2field_tabid_profileid_idx">
2700              <col>tabid</col>
2701              <col>profileid</col>
2702          </index>
2703          <index name="profile2field_visible_profileid_idx">
2704              <col>visible</col>
2705              <col>profileid</col>
2706          </index>
2707          <opt platform="mysql">Engine=InnoDB</opt>
2708      </table>
2709  
2710      <table name="vtiger_role2profile">
2711          <field name="roleid" type="C" size="255">
2712              <key />
2713          </field>
2714          <field name="profileid" type="I" size="11">
2715              <key />
2716          </field>
2717          <index name="role2profile_roleid_profileid_idx">
2718              <col>roleid</col>
2719              <col>profileid</col>
2720          </index>
2721          <opt platform="mysql">Engine=InnoDB</opt>
2722      </table>
2723  
2724      <table name="vtiger_org_share_action_mapping">
2725          <field name="share_action_id" type="I" size="19">
2726              <key />
2727          </field>
2728          <field name="share_action_name" type="C" size="200" />
2729  
2730          <opt platform="mysql">Engine=InnoDB</opt>
2731      </table>
2732  
2733      <table name="vtiger_def_org_share">
2734          <field name="ruleid" type="I" size="11">
2735              <key />
2736              <autoincrement />
2737          </field>
2738          <field name="tabid" type="I" size="11">
2739              <notnull />
2740          </field>
2741          <field name="permission" type="I" size="19">
2742          </field>
2743          <field name="editstatus" type="I" size="19" />
2744          <opt platform="mysql">Engine=InnoDB</opt>
2745      </table>
2746  
2747      <table name="vtiger_def_org_share" alter="true">
2748          <constraint>ADD CONSTRAINT fk_1_vtiger_def_org_share FOREIGN KEY (permission) REFERENCES vtiger_org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
2749          <opt>Engine=InnoDB</opt>
2750          <data>
2751          </data>
2752      </table>
2753  
2754      <table name="vtiger_def_org_field">
2755          <field name="tabid" type="I" size="10" />
2756          <field name="fieldid" type="I" size="19">
2757              <key />
2758          </field>
2759          <field name="visible" type="I" size="19" />
2760          <field name="readonly" type="I" size="19" />
2761  
2762          <index name="def_org_field_tabid_fieldid_idx">
2763              <col>tabid</col>
2764              <col>fieldid</col>
2765          </index>
2766          <index name="def_org_field_tabid_idx">
2767              <col>tabid</col>
2768          </index>
2769          <index name="def_org_field_visible_fieldid_idx">
2770              <col>visible</col>
2771              <col>fieldid</col>
2772          </index>
2773          <opt platform="mysql">Engine=InnoDB</opt>
2774      </table>
2775  
2776      <table name="vtiger_profile2utility">
2777          <field name="profileid" type="I" size="11">
2778              <key />
2779          </field>
2780          <field name="tabid" type="I" size="11">
2781              <key />
2782          </field>
2783          <field name="activityid" type="I" size="11">
2784              <key />
2785          </field>
2786          <field name="permission" type="I" size="1" />
2787  
2788          <index name="profile2utility_profileid_tabid_activityid_idx">
2789              <col>profileid</col>
2790              <col>tabid</col>
2791              <col>activityid</col>
2792          </index>
2793          <opt platform="mysql">Engine=InnoDB</opt>
2794      </table>
2795  
2796      <table name="vtiger_productcategory">
2797          <field name="productcategoryid" type="I" size="19">
2798              <key />
2799              <autoincrement />
2800          </field>
2801          <field name="productcategory" type="C" size="200">
2802              <notnull />
2803          </field>
2804          <field name="presence" type="I" size="1">
2805              <notnull />
2806              <default value="1" />
2807          </field>
2808          <field name="picklist_valueid" type="I" size="19">
2809              <notnull />
2810              <default value="0" />
2811          </field>
2812          <field name="sortorderid" type="I" size="11"></field>
2813          <index name="productcategory_productcategory_idx">
2814              <col>productcategory</col>
2815              <unique />
2816          </index>
2817          <opt platform="mysql">Engine=InnoDB</opt>
2818      </table>
2819  
2820      <table name="vtiger_salesorder">
2821          <field name="salesorderid" type="I" size="19">
2822              <key />
2823              <notnull />
2824              <default value="0" />
2825          </field>
2826          <field name="subject" type="C" size="100" />
2827          <field name="potentialid" type="I" size="19" />
2828          <field name="customerno" type="C" size="100" />
2829          <field name="salesorder_no" type="C" size="100" />
2830          <field name="quoteid" type="I" size="19" />
2831          <field name="vendorterms" type="C" size="100" />
2832          <field name="contactid" type="I" size="19">
2833          </field>
2834          <field name="vendorid" type="I" size="19">
2835          </field>
2836          <field name="duedate" type="D" />
2837          <field name="carrier" type="C" size='200' />
2838          <field name="pending" type="C" size='200' />
2839          <field name="type" type="C" size="100" />
2840          <field name="adjustment" type="N" size="25.3" />
2841          <field name="salescommission" type="N" size="25.3" />
2842          <field name="exciseduty" type="N" size="25.3" />
2843          <field name="total" type="N" size="25.3" />
2844          <field name="subtotal" type="N" size="25.3" />
2845          <field name="taxtype" type="C" size="25" />
2846          <field name="discount_percent" type="N" size="25.3" />
2847          <field name="discount_amount" type="N" size="25.3" />
2848          <field name="s_h_amount" type="N" size="25.3" />
2849          <field name="accountid" type="I" size="19" />
2850          <field name="terms_conditions" type="X" />
2851          <field name="purchaseorder" type="C" size='200' />
2852          <field name="sostatus" type="C" size='200' />
2853          <field name="currency_id" type="I" size='19' >
2854              <notnull />
2855              <default value="1" />
2856          </field>
2857          <field name="conversion_rate" type="N" size='10.3' >
2858              <notnull />
2859              <default value="1.000" />
2860          </field>
2861          <field name="enable_recurring" type="I">
2862              <default value="0" />
2863          </field>
2864          <index name="salesorder_vendorid_idx">
2865              <col>vendorid</col>
2866          </index>
2867          <index name="salesorder_contactid_idx">
2868              <col>contactid</col>
2869          </index>
2870          <opt platform="mysql">Engine=InnoDB</opt>
2871      </table>
2872  
2873      <table name="vtiger_salesorder" alter="true">
2874          <constraint>ADD CONSTRAINT fk_1_vtiger_salesorder FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
2875          <constraint>ADD CONSTRAINT fk_2_vtiger_salesorder FOREIGN KEY (salesorderid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
2876          <constraint>ADD CONSTRAINT fk_3_vtiger_salesorder FOREIGN KEY (vendorid) REFERENCES vtiger_vendor(vendorid) ON DELETE CASCADE</constraint>
2877          <opt>Engine=InnoDB</opt>
2878          <data>
2879          </data>
2880      </table>
2881  
2882      <table name="vtiger_sobillads">
2883          <field name="sobilladdressid" type="I" size="19">
2884              <key />
2885              <default value="0" />
2886          </field>
2887          <field name="bill_city" type="C" size="30" />
2888          <field name="bill_code" type="C" size="30" />
2889          <field name="bill_country" type="C" size="30" />
2890          <field name="bill_state" type="C" size="30" />
2891          <field name="bill_street" type="C" size="250" />
2892          <field name="bill_pobox" type="C" size="30" />
2893  
2894          <opt platform="mysql">Engine=InnoDB</opt>
2895      </table>
2896  
2897      <table name="vtiger_sobillads" alter="true">
2898          <constraint>ADD CONSTRAINT fk_1_vtiger_sobillads FOREIGN KEY (sobilladdressid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
2899          <opt>Engine=InnoDB</opt>
2900          <data>
2901          </data>
2902      </table>
2903  
2904      <table name="vtiger_soshipads">
2905          <field name="soshipaddressid" type="I" size="19">
2906              <key />
2907              <default value="0" />
2908          </field>
2909          <field name="ship_city" type="C" size="30" />
2910          <field name="ship_code" type="C" size="30" />
2911          <field name="ship_country" type="C" size="30" />
2912          <field name="ship_state" type="C" size="30" />
2913          <field name="ship_street" type="C" size="250" />
2914          <field name="ship_pobox" type="C" size="30" />
2915  
2916          <opt platform="mysql">Engine=InnoDB</opt>
2917      </table>
2918  
2919      <table name="vtiger_soshipads" alter="true">
2920          <constraint>ADD CONSTRAINT fk_1_vtiger_soshipads FOREIGN KEY (soshipaddressid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
2921          <opt>Engine=InnoDB</opt>
2922          <data>
2923          </data>
2924      </table>
2925  
2926      <table name="vtiger_salesordercf">
2927          <field name="salesorderid" type="I" size="19">
2928              <key />
2929              <default value="0"/>
2930          </field>
2931  
2932          <opt platform="mysql">Engine=InnoDB</opt>
2933      </table>
2934  
2935      <table name="vtiger_salesordercf" alter="true">
2936          <constraint>ADD CONSTRAINT fk_1_vtiger_salesordercf FOREIGN KEY (salesorderid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
2937          <opt>Engine=InnoDB</opt>
2938          <data>
2939          </data>
2940      </table>
2941  
2942  
2943      <table name="vtiger_notificationscheduler">
2944          <field name="schedulednotificationid" type="I" size="19">
2945              <key />
2946              <autoincrement />
2947          </field>
2948          <field name="schedulednotificationname" type="C" size="200" />
2949          <field name="active" type="I" size="1" />
2950          <field name="notificationsubject" type="C" size="200" />
2951          <field name="notificationbody" type="X" />
2952          <field name="label" type="C" size="50" />
2953          <field name="type" type="C" size="10" />
2954          <index name="notificationscheduler_schedulednotificationname_idx">
2955              <col>schedulednotificationname</col>
2956              <unique />
2957          </index>
2958          <opt platform="mysql">Engine=InnoDB</opt>
2959      </table>
2960  
2961      <table name="vtiger_activityproductrel">
2962          <field name="activityid" type="I" size="19">
2963              <key />
2964              <default value="0" />
2965          </field>
2966          <field name="productid" type="I" size="19">
2967              <key />
2968              <default value="0" />
2969          </field>
2970  
2971          <index name="activityproductrel_activityid_idx">
2972              <col>activityid</col>
2973          </index>
2974          <index name="activityproductrel_productid_idx">
2975              <col>productid</col>
2976          </index>
2977          <opt platform="mysql">Engine=InnoDB</opt>
2978      </table>
2979  
2980      <table name="vtiger_activityproductrel" alter="true">
2981          <constraint>ADD CONSTRAINT fk_1_vtiger_activityproductrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
2982          <constraint>ADD CONSTRAINT fk_2_vtiger_activityproductrel FOREIGN KEY (productid) REFERENCES vtiger_products(productid) ON DELETE CASCADE</constraint>
2983          <opt>Engine=InnoDB</opt>
2984          <data>
2985          </data>
2986      </table>
2987  
2988      <table name="vtiger_relatedlists">
2989          <field name="relation_id" type="I" size="19">
2990              <key />
2991          </field>
2992          <field name="tabid" type="I" size="10" />
2993          <field name="related_tabid" type="I" size="10" />
2994          <field name="name" type="C" size="100" />
2995          <field name="sequence" type="I" size="10" />
2996          <field name="label" type="C" size="100" />
2997          <field name="presence" type="I" size="10">
2998              <notnull />
2999              <default value="0" />
3000          </field>
3001          <field name="actions" type="C" size="50">
3002              <notnull />
3003              <default value="" />
3004          </field>
3005          <index name="relatedlists_relation_id_idx">
3006              <col>relation_id</col>
3007          </index>
3008          <opt platform="mysql">Engine=InnoDB</opt>
3009      </table>
3010  
3011      <table name="vtiger_rss">
3012          <field name="rssid" type="I" size="19">
3013              <key />
3014          </field>
3015          <field name="rssurl" type="C" size="200">
3016              <notnull />
3017              <default value="" />
3018          </field>
3019          <field name="rsstitle" type="C" size="200" />
3020          <field name="rsstype" type="I" size="10">
3021              <default value="0" />
3022          </field>
3023          <field name="starred" type="I" size="1">
3024              <default value="0" />
3025          </field>
3026          <opt platform="mysql">Engine=InnoDB</opt>
3027      </table>
3028  
3029      <table name="vtiger_vendorcf">
3030          <field name="vendorid" type="I" size="19">
3031              <key />
3032              <default value="0" />
3033          </field>
3034  
3035          <opt platform="mysql">Engine=InnoDB</opt>
3036      </table>
3037  
3038      <table name="vtiger_vendorcf" alter="true">
3039          <constraint>ADD CONSTRAINT fk_1_vtiger_vendorcf FOREIGN KEY (vendorid) REFERENCES vtiger_vendor(vendorid) ON DELETE CASCADE</constraint>
3040          <opt>Engine=InnoDB</opt>
3041          <data>
3042          </data>
3043      </table>
3044  
3045      <table name="vtiger_pricebook">
3046          <field name="pricebookid" type="I" size="19">
3047              <key />
3048              <notnull />
3049              <default value="0" />
3050          </field>
3051          <field name="pricebook_no" type="C" size="100">
3052              <notnull />
3053              <unique />
3054          </field>
3055          <field name="bookname" type="C" size="100" />
3056          <field name="active" type="I" size="1" />
3057          <field name="currency_id" type="I" size="19">
3058              <notnull />
3059              <default value="1" />
3060          </field>
3061  
3062          <opt platform="mysql">Engine=InnoDB</opt>
3063      </table>
3064  
3065      <table name="vtiger_pricebook" alter="true">
3066          <constraint>ADD CONSTRAINT fk_1_vtiger_pricebook FOREIGN KEY (pricebookid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
3067          <opt>Engine=InnoDB</opt>
3068          <data>
3069          </data>
3070      </table>
3071  
3072      <table name="vtiger_pricebookcf">
3073          <field name="pricebookid" type="I" size="19">
3074              <key />
3075              <default value="0" />
3076          </field>
3077  
3078          <opt platform="mysql">Engine=InnoDB</opt>
3079      </table>
3080  
3081      <table name="vtiger_pricebookcf" alter="true">
3082          <constraint>ADD CONSTRAINT fk_1_vtiger_pricebookcf FOREIGN KEY (pricebookid) REFERENCES vtiger_pricebook(pricebookid) ON DELETE CASCADE</constraint>
3083          <opt>Engine=InnoDB</opt>
3084          <data>
3085          </data>
3086      </table>
3087  
3088      <table name="vtiger_pricebookproductrel">
3089          <field name="pricebookid" type="I" size="19">
3090              <key />
3091          </field>
3092          <field name="productid" type="I" size="19">
3093              <key />
3094          </field>
3095          <field name="listprice" type="N" size="25.3" />
3096          <field name="usedcurrency" type="I" size="11">
3097              <notnull />
3098              <default value="1" />
3099          </field>
3100  
3101          <index name="pricebookproductrel_pricebookid_idx">
3102              <col>pricebookid</col>
3103          </index>
3104          <index name="pricebookproductrel_productid_idx">
3105              <col>productid</col>
3106          </index>
3107          <opt platform="mysql">Engine=InnoDB</opt>
3108      </table>
3109  
3110      <table name="vtiger_pricebookproductrel" alter="true">
3111          <constraint>ADD CONSTRAINT fk_1_vtiger_pricebookproductrel FOREIGN KEY (pricebookid) REFERENCES vtiger_pricebook(pricebookid) ON DELETE CASCADE</constraint>
3112          <opt>Engine=InnoDB</opt>
3113          <data>
3114          </data>
3115      </table>
3116  
3117      <table name="vtiger_mail_accounts">
3118          <field name="account_id" type="I" size="11">
3119              <key />
3120          </field>
3121          <field name="user_id" type="I" size="11">
3122              <notnull />
3123          </field>
3124          <field name="display_name" type="C" size="50" />
3125          <field name="mail_id" type="C" size="50" />
3126          <field name="account_name" type="C" size="50" />
3127          <field name="mail_protocol" type="C" size="20" />
3128          <field name="mail_username" type="C" size="50">
3129              <notnull />
3130          </field>
3131          <field name="mail_password" type="C" size="250">
3132              <notnull />
3133          </field>
3134          <field name="mail_servername" type="C" size="50" />
3135          <field name="box_refresh" type="I" size="10" />
3136          <field name="mails_per_page" type="I" size="10" />
3137          <field name="ssltype" type="C" size="50" />
3138          <field name="sslmeth" type="C" size="50" />
3139          <field name="int_mailer" type="I" size="1">
3140              <default value="0" />
3141          </field>
3142          <field name="status" type="C" size="10" />
3143          <field name="set_default" type="I" size="2" />
3144          <opt platform="mysql">Engine=InnoDB</opt>
3145      </table>
3146  
3147      <table name="vtiger_quotes">
3148          <field name="quoteid" type="I" size="19">
3149              <key />
3150              <notnull />
3151              <default value="0" />
3152          </field>
3153          <field name="subject" type="C" size="100" />
3154          <field name="potentialid" type="I" size="19">
3155          </field>
3156          <field name="quotestage" type="C" size="200" />
3157          <field name="validtill" type="D" />
3158          <field name="contactid" type="I" size="19">
3159          </field>
3160          <field name="quote_no" type="C" size="100" />
3161          <field name="subtotal" type="N" size="25.3" />
3162          <field name="carrier" type="C" size='200' />
3163          <field name="shipping" type="C" size="100" />
3164          <field name="inventorymanager" type="I" size="19" />
3165          <field name="type" type="C" size="100" />
3166          <field name="adjustment" type="N" size="25.3" />
3167          <field name="total" type="N" size="25.3" />
3168          <field name="taxtype" type="C" size="25" />
3169          <field name="discount_percent" type="N" size="25.3" />
3170          <field name="discount_amount" type="N" size="25.3" />
3171          <field name="s_h_amount" type="N" size="25.3" />
3172          <field name="accountid" type="I" size="19" />
3173          <field name="terms_conditions" type="X" />
3174          <field name="currency_id" type="I" size='19' >
3175              <notnull />
3176              <default value="1" />
3177          </field>
3178          <field name="conversion_rate" type="N" size='10.3' >
3179              <notnull />
3180              <default value="1.000" />
3181          </field>
3182          <index name="quote_quotestage_idx">
3183              <col>quotestage</col>
3184          </index>
3185          <index name="quotes_potentialid_idx">
3186              <col>potentialid</col>
3187          </index>
3188          <index name="quotes_contactid_idx">
3189              <col>contactid</col>
3190          </index>
3191          <opt platform="mysql">Engine=InnoDB</opt>
3192      </table>
3193  
3194      <table name="vtiger_quotes" alter="true">
3195          <constraint>ADD CONSTRAINT fk_1_vtiger_quotes FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
3196          <constraint>ADD CONSTRAINT fk_2_vtiger_quotes FOREIGN KEY (quoteid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
3197          <constraint>ADD CONSTRAINT fk_3_vtiger_quotes FOREIGN KEY (potentialid) REFERENCES vtiger_potential(potentialid) ON DELETE CASCADE</constraint>
3198          <opt>Engine=InnoDB</opt>
3199          <data>
3200          </data>
3201      </table>
3202  
3203      <table name="vtiger_quotesbillads">
3204          <field name="quotebilladdressid" type="I" size="19">
3205              <key />
3206              <default value="0" />
3207          </field>
3208          <field name="bill_city" type="C" size="30" />
3209          <field name="bill_code" type="C" size="30" />
3210          <field name="bill_country" type="C" size="30" />
3211          <field name="bill_state" type="C" size="30" />
3212          <field name="bill_street" type="C" size="250" />
3213          <field name="bill_pobox" type="C" size="30" />
3214  
3215          <opt platform="mysql">Engine=InnoDB</opt>
3216      </table>
3217  
3218      <table name="vtiger_quotesbillads" alter="true">
3219          <constraint>ADD CONSTRAINT fk_1_vtiger_quotesbillads FOREIGN KEY (quotebilladdressid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
3220          <opt>Engine=InnoDB</opt>
3221          <data>
3222          </data>
3223      </table>
3224  
3225      <table name="vtiger_quotesshipads">
3226          <field name="quoteshipaddressid" type="I" size="19">
3227              <key />
3228              <default value="0" />
3229          </field>
3230          <field name="ship_city" type="C" size="30" />
3231          <field name="ship_code" type="C" size="30" />
3232          <field name="ship_country" type="C" size="30" />
3233          <field name="ship_state" type="C" size="30" />
3234          <field name="ship_street" type="C" size="250" />
3235          <field name="ship_pobox" type="C" size="30" />
3236  
3237          <opt platform="mysql">Engine=InnoDB</opt>
3238      </table>
3239  
3240      <table name="vtiger_quotesshipads" alter="true">
3241          <constraint>ADD CONSTRAINT fk_1_vtiger_quotesshipads FOREIGN KEY (quoteshipaddressid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
3242          <opt>Engine=InnoDB</opt>
3243          <data>
3244          </data>
3245      </table>
3246  
3247      <table name="vtiger_quotescf">
3248          <field name="quoteid" type="I" size="19">
3249              <key />
3250              <default value="0" />
3251          </field>
3252  
3253          <opt platform="mysql">Engine=InnoDB</opt>
3254      </table>
3255  
3256      <table name="vtiger_quotescf" alter="true">
3257          <constraint>ADD CONSTRAINT fk_1_vtiger_quotescf FOREIGN KEY (quoteid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
3258          <opt>Engine=InnoDB</opt>
3259          <data>
3260          </data>
3261      </table>
3262  
3263      <table name="vtiger_purchaseorder">
3264          <field name="purchaseorderid" type="I" size="19">
3265              <key />
3266              <notnull />
3267              <default value="0" />
3268          </field>
3269          <field name="subject" type="C" size="100" />
3270          <field name="quoteid" type="I" size="19">
3271          </field>
3272          <field name="vendorid" type="I" size="19">
3273          </field>
3274          <field name="requisition_no" type="C" size="100" />
3275          <field name="purchaseorder_no" type="C" size="100" />
3276          <field name="tracking_no" type="C" size="100" />
3277          <field name="contactid" type="I" size="19">
3278          </field>
3279          <field name="duedate" type="D" />
3280          <field name="carrier" type="C" size='200' />
3281          <field name="type" type="C" size="100" />
3282          <field name="adjustment" type="N" size="25.3" />
3283          <field name="salescommission" type="N" size="25.3" />
3284          <field name="exciseduty" type="N" size="25.3" />
3285          <field name="total" type="N" size="25.3" />
3286          <field name="subtotal" type="N" size="25.3" />
3287          <field name="taxtype" type="C" size="25" />
3288          <field name="discount_percent" type="N" size="25.3" />
3289          <field name="discount_amount" type="N" size="25.3" />
3290          <field name="s_h_amount" type="N" size="25.3" />
3291          <field name="terms_conditions" type="X" />
3292          <field name="postatus" type="C" size="200" />
3293          <field name="currency_id" type="I" size='19' >
3294              <notnull />
3295              <default value="1" />
3296          </field>
3297          <field name="conversion_rate" type="N" size='10.3' >
3298              <notnull />
3299              <default value="1.000" />
3300          </field>
3301  
3302          <index name="purchaseorder_vendorid_idx">
3303              <col>vendorid</col>
3304          </index>
3305          <index name="purchaseorder_quoteid_idx">
3306              <col>quoteid</col>
3307          </index>
3308          <index name="purchaseorder_contactid_idx">
3309              <col>contactid</col>
3310          </index>
3311          <opt platform="mysql">Engine=InnoDB</opt>
3312      </table>
3313  
3314      <table name="vtiger_purchaseorder" alter="true">
3315          <constraint>ADD CONSTRAINT fk_1_vtiger_purchaseorder FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
3316          <constraint>ADD CONSTRAINT fk_2_vtiger_purchaseorder FOREIGN KEY (purchaseorderid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
3317          <constraint>ADD CONSTRAINT fk_3_vtiger_purchaseorder FOREIGN KEY (quoteid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
3318          <constraint>ADD CONSTRAINT fk_4_vtiger_purchaseorder FOREIGN KEY (vendorid) REFERENCES vtiger_vendor(vendorid) ON DELETE CASCADE</constraint>
3319          <opt>Engine=InnoDB</opt>
3320          <data>
3321          </data>
3322      </table>
3323  
3324      <table name="vtiger_pobillads">
3325          <field name="pobilladdressid" type="I" size="19">
3326              <key />
3327              <default value="0" />
3328          </field>
3329          <field name="bill_city" type="C" size="30" />
3330          <field name="bill_code" type="C" size="30" />
3331          <field name="bill_country" type="C" size="30" />
3332          <field name="bill_state" type="C" size="30" />
3333          <field name="bill_street" type="C" size="250" />
3334          <field name="bill_pobox" type="C" size="30" />
3335  
3336          <opt platform="mysql">Engine=InnoDB</opt>
3337      </table>
3338  
3339      <table name="vtiger_pobillads" alter="true">
3340          <constraint>ADD CONSTRAINT fk_1_vtiger_pobillads FOREIGN KEY (pobilladdressid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
3341          <opt>Engine=InnoDB</opt>
3342          <data>
3343          </data>
3344      </table>
3345  
3346      <table name="vtiger_poshipads">
3347          <field name="poshipaddressid" type="I" size="19">
3348              <key />
3349              <default value="0" />
3350          </field>
3351          <field name="ship_city" type="C" size="30" />
3352          <field name="ship_code" type="C" size="30" />
3353          <field name="ship_country" type="C" size="30" />
3354          <field name="ship_state" type="C" size="30" />
3355          <field name="ship_street" type="C" size="250" />
3356          <field name="ship_pobox" type="C" size="30" />
3357  
3358          <opt platform="mysql">Engine=InnoDB</opt>
3359      </table>
3360  
3361      <table name="vtiger_poshipads" alter="true">
3362          <constraint>ADD CONSTRAINT fk_1_vtiger_poshipads FOREIGN KEY (poshipaddressid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
3363          <opt>Engine=InnoDB</opt>
3364          <data>
3365          </data>
3366      </table>
3367  
3368      <table name="vtiger_purchaseordercf">
3369          <field name="purchaseorderid" type="I" size="19">
3370              <key />
3371              <default value="0" />
3372          </field>
3373  
3374          <opt platform="mysql">Engine=InnoDB</opt>
3375      </table>
3376  
3377      <table name="vtiger_purchaseordercf" alter="true">
3378          <constraint>ADD CONSTRAINT fk_1_vtiger_purchaseordercf FOREIGN KEY (purchaseorderid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
3379          <opt>Engine=InnoDB</opt>
3380          <data>
3381          </data>
3382      </table>
3383  
3384  
3385      <table name="vtiger_invoice">
3386          <field name="invoiceid" type="I" size="19">
3387              <key />
3388              <notnull />
3389              <default value="0" />
3390          </field>
3391          <field name="subject" type="C" size="100" />
3392          <field name="salesorderid" type="I" size="19">
3393          </field>
3394          <field name="customerno" type="C" size="100" />
3395          <field name="contactid" type="I" size="19" />
3396          <field name="notes" type="C" size="100" />
3397          <field name="invoicedate" type="D" />
3398          <field name="duedate" type="D" />
3399          <field name="invoiceterms" type="C" size="100" />
3400          <field name="type" type="C" size="100" />
3401          <field name="adjustment" type="N" size="25.3" />
3402          <field name="salescommission" type="N" size="25.3" />
3403          <field name="exciseduty" type="N" size="25.3" />
3404          <field name="subtotal" type="N" size="25.3" />
3405          <field name="total" type="N" size="25.3" />
3406          <field name="taxtype" type="C" size="25" />
3407          <field name="discount_percent" type="N" size="25.3" />
3408          <field name="discount_amount" type="N" size="25.3" />
3409          <field name="s_h_amount" type="N" size="25.3" />
3410          <field name="shipping" type="C" size="100" />
3411          <field name="accountid" type="I" size="19" />
3412          <field name="terms_conditions" type="X" />
3413          <field name="purchaseorder" type="C" size='200' />
3414          <field name="invoicestatus" type="C" size='200' />
3415          <field name="invoice_no" type="C" size='100' >
3416              <default value="NULL" />
3417              <unique />
3418          </field>
3419          <field name="currency_id" type="I" size='19' >
3420              <notnull />
3421              <default value="1" />
3422          </field>
3423          <field name="conversion_rate" type="N" size='10.3' >
3424              <notnull />
3425              <default value="1.000" />
3426          </field>
3427          <index name="invoice_purchaseorderid_idx">
3428              <col>invoiceid</col>
3429          </index>
3430          <opt platform="mysql">Engine=InnoDB</opt>
3431      </table>
3432  
3433      <table name="vtiger_invoice" alter="true">
3434          <constraint>ADD CONSTRAINT fk_1_vtiger_invoice FOREIGN KEY (invoiceid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
3435          <constraint>ADD CONSTRAINT fk_2_vtiger_invoice FOREIGN KEY (salesorderid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
3436          <opt>Engine=InnoDB</opt>
3437          <data>
3438          </data>
3439      </table>
3440  
3441      <table name="vtiger_invoicebillads">
3442          <field name="invoicebilladdressid" type="I" size="19">
3443              <key />
3444              <default value="0" />
3445          </field>
3446          <field name="bill_city" type="C" size="30" />
3447          <field name="bill_code" type="C" size="30" />
3448          <field name="bill_country" type="C" size="30" />
3449          <field name="bill_state" type="C" size="30" />
3450          <field name="bill_street" type="C" size="250" />
3451          <field name="bill_pobox" type="C" size="30" />
3452  
3453          <opt platform="mysql">Engine=InnoDB</opt>
3454      </table>
3455  
3456      <table name="vtiger_invoicebillads" alter="true">
3457          <constraint>ADD CONSTRAINT fk_1_vtiger_invoicebillads FOREIGN KEY (invoicebilladdressid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
3458          <opt>Engine=InnoDB</opt>
3459          <data>
3460          </data>
3461      </table>
3462  
3463      <table name="vtiger_invoiceshipads">
3464          <field name="invoiceshipaddressid" type="I" size="19">
3465              <key />
3466              <default value="0" />
3467          </field>
3468          <field name="ship_city" type="C" size="30" />
3469          <field name="ship_code" type="C" size="30" />
3470          <field name="ship_country" type="C" size="30" />
3471          <field name="ship_state" type="C" size="30" />
3472          <field name="ship_street" type="C" size="250" />
3473          <field name="ship_pobox" type="C" size="30" />
3474  
3475          <opt platform="mysql">Engine=InnoDB</opt>
3476      </table>
3477  
3478      <table name="vtiger_invoiceshipads" alter="true">
3479          <constraint>ADD CONSTRAINT fk_1_vtiger_invoiceshipads FOREIGN KEY (invoiceshipaddressid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
3480          <opt>Engine=InnoDB</opt>
3481          <data>
3482          </data>
3483      </table>
3484  
3485      <table name="vtiger_invoicecf">
3486          <field name="invoiceid" type="I" size="19">
3487              <key />
3488              <default value="0" />
3489          </field>
3490  
3491          <opt platform="mysql">Engine=InnoDB</opt>
3492      </table>
3493  
3494      <table name="vtiger_invoicecf" alter="true">
3495          <constraint>ADD CONSTRAINT fk_1_vtiger_invoicecf FOREIGN KEY (invoiceid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
3496          <opt>Engine=InnoDB</opt>
3497          <data>
3498          </data>
3499      </table>
3500  
3501  
3502      <table name="vtiger_activity_reminder">
3503          <field name="activity_id" type="I" size="11">
3504              <key />
3505              <notnull />
3506          </field>
3507          <field name="reminder_time" type="I" size="11">
3508              <notnull />
3509          </field>
3510          <field name="reminder_sent" type="I" size="2">
3511              <notnull />
3512          </field>
3513          <field name="recurringid" type="I" size="19">
3514              <key />
3515              <notnull />
3516          </field>
3517          <opt platform="mysql">Engine=InnoDB</opt>
3518      </table>
3519  
3520      <table name="vtiger_customview">
3521          <field name="cvid" type="I" size="19">
3522              <key />
3523          </field>
3524          <field name="viewname" type="C" size="100">
3525              <notnull />
3526          </field>
3527          <field name="setdefault" type="I" size="1">
3528              <default value="0" />
3529          </field>
3530          <field name="setmetrics" type="I" size="1">
3531              <default value="0" />
3532          </field>
3533          <field name="entitytype" type="C" size="25">
3534              <notnull />
3535          </field>
3536          <field name="status" type="I" size="1">
3537              <default value="1" />
3538          </field>
3539          <field name="userid" type="I" size="19">
3540              <default value="1" />
3541          </field>
3542          <index name="customview_entitytype_idx">
3543              <col>entitytype</col>
3544          </index>
3545  
3546          <opt platform="mysql">Engine=InnoDB</opt>
3547      </table>
3548  
3549      <table name="vtiger_customview" alter="true">
3550          <constraint>ADD CONSTRAINT fk_1_vtiger_customview FOREIGN KEY (entitytype) REFERENCES vtiger_tab (name) ON DELETE CASCADE</constraint>
3551          <opt>Engine=InnoDB</opt>
3552          <data>
3553          </data>
3554      </table>
3555  
3556      <table name="vtiger_cvcolumnlist">
3557          <field name="cvid" type="I" size="19">
3558              <key />
3559              <notnull />
3560          </field>
3561          <field name="columnindex" type="I" size="11">
3562              <key />
3563              <notnull />
3564          </field>
3565          <field name="columnname" type="C" size="250">
3566              <default value="" />
3567          </field>
3568  
3569          <index name="cvcolumnlist_columnindex_idx">
3570              <col>columnindex</col>
3571          </index>
3572          <index name="cvcolumnlist_cvid_idx">
3573              <col>cvid</col>
3574          </index>
3575          <opt platform="mysql">Engine=InnoDB</opt>
3576      </table>
3577  
3578      <table name="vtiger_cvcolumnlist" alter="true">
3579          <constraint>ADD CONSTRAINT fk_1_vtiger_cvcolumnlist FOREIGN KEY (cvid) REFERENCES vtiger_customview (cvid) ON DELETE CASCADE</constraint>
3580          <opt>Engine=InnoDB</opt>
3581          <data>
3582          </data>
3583      </table>
3584  
3585      <table name="vtiger_cvstdfilter">
3586          <field name="cvid" type="I" size="19">
3587              <key />
3588          </field>
3589          <field name="columnname" type="C" size="250">
3590              <default value="" />
3591          </field>
3592          <field name="stdfilter" type="C" size="250">
3593              <default value="" />
3594          </field>
3595          <field name="startdate" type="D">
3596              <default value="NULL" />
3597          </field>
3598          <field name="enddate" type="D">
3599              <default value="NULL" />
3600          </field>
3601  
3602          <index name="cvstdfilter_cvid_idx">
3603              <col>cvid</col>
3604          </index>
3605          <opt platform="mysql">Engine=InnoDB</opt>
3606      </table>
3607  
3608      <table name="vtiger_cvstdfilter" alter="true">
3609          <constraint>ADD CONSTRAINT fk_1_vtiger_cvstdfilter FOREIGN KEY (cvid) REFERENCES vtiger_customview (cvid) ON DELETE CASCADE</constraint>
3610          <opt>Engine=InnoDB</opt>
3611          <data>
3612          </data>
3613      </table>
3614  
3615      <table name="vtiger_cvadvfilter">
3616          <field name="cvid" type="I" size="19">
3617              <key />
3618          </field>
3619          <field name="columnindex" type="I" size="11">
3620              <key />
3621              <notnull />
3622          </field>
3623          <field name="columnname" type="C" size="250">
3624              <default value="" />
3625          </field>
3626          <field name="comparator" type="C" size="10">
3627              <default value="" />
3628          </field>
3629          <field name="value" type="C" size="200">
3630              <default value="" />
3631          </field>
3632          <field name="groupid" type="I">
3633              <default value="1" />
3634          </field>
3635          <field name="column_condition" type="C" size="255">
3636              <default value="and" />
3637          </field>
3638  
3639          <index name="cvadvfilter_cvid_idx">
3640              <col>cvid</col>
3641          </index>
3642          <opt platform="mysql">Engine=InnoDB</opt>
3643      </table>
3644  
3645      <table name="vtiger_cvadvfilter" alter="true">
3646          <constraint>ADD CONSTRAINT fk_1_vtiger_cvadvfilter FOREIGN KEY (cvid) REFERENCES vtiger_customview (cvid) ON DELETE CASCADE</constraint>
3647          <opt>Engine=InnoDB</opt>
3648          <data>
3649          </data>
3650      </table>
3651  
3652      <table name="vtiger_customaction">
3653          <field name="cvid" type="I" size="19">
3654              <notnull />
3655          </field>
3656          <field name="subject" type="C" size="250">
3657              <notnull />
3658          </field>
3659          <field name="module" type="C" size="50">
3660              <notnull />
3661          </field>
3662          <field name="content" type="X">
3663              <default value="" />
3664          </field>
3665  
3666          <index name="customaction_cvid_idx">
3667              <col>cvid</col>
3668          </index>
3669          <opt platform="mysql">Engine=InnoDB</opt>
3670      </table>
3671  
3672      <table name="vtiger_customaction" alter="true">
3673          <constraint>ADD CONSTRAINT fk_1_vtiger_customaction FOREIGN KEY (cvid) REFERENCES vtiger_customview (cvid) ON DELETE CASCADE</constraint>
3674          <opt>Engine=InnoDB</opt>
3675          <data>
3676          </data>
3677      </table>
3678  
3679      <table name="vtiger_selectquery">
3680          <field name="queryid" type="I" size="19">
3681              <key />
3682          </field>
3683          <field name="startindex" type="I" size="19">
3684              <default value="0" />
3685          </field>
3686          <field name="numofobjects" type="I" size="19">
3687              <default value="0" />
3688          </field>
3689  
3690          <index name="selectquery_queryid_idx">
3691              <col>queryid</col>
3692          </index>
3693          <opt platform="mysql">Engine=InnoDB</opt>
3694      </table>
3695  
3696      <table name="vtiger_selectcolumn">
3697          <field name="queryid" type="I" size="19">
3698              <key />
3699          </field>
3700          <field name="columnindex" type="I" size="11">
3701              <key />
3702              <notnull />
3703              <default value="0" />
3704          </field>
3705          <field name="columnname" type="C" size="250">
3706              <default value="" />
3707          </field>
3708  
3709          <index name="selectcolumn_queryid_idx">
3710              <col>queryid</col>
3711          </index>
3712          <opt platform="mysql">Engine=InnoDB</opt>
3713      </table>
3714  
3715      <table name="vtiger_selectcolumn" alter="true">
3716          <constraint>ADD CONSTRAINT fk_1_vtiger_selectcolumn FOREIGN KEY (queryid) REFERENCES vtiger_selectquery (queryid) ON DELETE CASCADE</constraint>
3717          <opt>Engine=InnoDB</opt>
3718          <data>
3719          </data>
3720      </table>
3721  
3722      <table name="vtiger_relcriteria">
3723          <field name="queryid" type="I" size="19">
3724              <key />
3725          </field>
3726          <field name="columnindex" type="I" size="11">
3727              <key />
3728              <notnull />
3729          </field>
3730          <field name="columnname" type="C" size="250">
3731              <default value="" />
3732          </field>
3733          <field name="comparator" type="C" size="10">
3734              <default value="" />
3735          </field>
3736          <field name="value" type="C" size="200">
3737              <default value="" />
3738          </field>
3739          <field name="groupid" type="I" size="11">
3740              <default value="1" />
3741          </field>
3742          <field name="column_condition" type="C" size="256">
3743              <default value="and" />
3744          </field>
3745  
3746          <index name="relcriteria_queryid_idx">
3747              <col>queryid</col>
3748          </index>
3749          <opt platform="mysql">Engine=InnoDB</opt>
3750      </table>
3751  
3752      <table name="vtiger_relcriteria" alter="true">
3753          <constraint>ADD CONSTRAINT fk_1_vtiger_relcriteria FOREIGN KEY (queryid) REFERENCES vtiger_selectquery (queryid) ON DELETE CASCADE</constraint>
3754          <opt>Engine=InnoDB</opt>
3755          <data>
3756          </data>
3757      </table>
3758  
3759      <table name="vtiger_reportfolder">
3760          <field name="folderid" type="I" size="19">
3761              <key />
3762              <autoincrement />
3763          </field>
3764          <field name="foldername" type="C" size="100">
3765              <notnull />
3766              <default value="" />
3767          </field>
3768          <field name="description" type="C" size="250">
3769              <default value="" />
3770          </field>
3771          <field name="state" type="C" size="50">
3772              <default value="SAVED" />
3773          </field>
3774  
3775          <opt platform="mysql">Engine=InnoDB</opt>
3776      </table>
3777  
3778      <table name="vtiger_report">
3779          <field name="reportid" type="I" size="19">
3780              <key />
3781          </field>
3782          <field name="folderid" type="I" size="19">
3783              <notnull />
3784          </field>
3785          <field name="reportname" type="C" size="100">
3786              <default value="" />
3787          </field>
3788          <field name="description" type="C" size="250">
3789              <default value="" />
3790          </field>
3791          <field name="reporttype" type="C" size="50">
3792              <default value="" />
3793          </field>
3794          <field name="queryid" type="I" size="19">
3795              <notnull />
3796              <default value="0" />
3797          </field>
3798          <field name="state" type="C" size="50">
3799              <default value="SAVED" />
3800          </field>
3801          <field name="customizable" type="I" size="1">
3802              <default value="1" />
3803          </field>
3804          <field name="category" type="I" size="11">
3805              <default value="1" />
3806          </field>
3807          <field name="owner" type="I" size="11">
3808              <default value="1" />
3809          </field>
3810          <field name="sharingtype" type="C" size="200">
3811              <default value="Private" />
3812          </field>
3813  
3814          <index name="report_queryid_idx">
3815              <col>queryid</col>
3816          </index>
3817          <index name="report_folderid_idx">
3818              <col>folderid</col>
3819          </index>
3820          <opt platform="mysql">Engine=InnoDB</opt>
3821      </table>
3822  
3823      <table name="vtiger_report" alter="true">
3824          <constraint>ADD CONSTRAINT fk_1_vtiger_report FOREIGN KEY (folderid) REFERENCES vtiger_reportfolder (folderid) ON DELETE CASCADE</constraint>
3825          <constraint>ADD CONSTRAINT fk_2_vtiger_report FOREIGN KEY (queryid) REFERENCES vtiger_selectquery (queryid) ON DELETE CASCADE</constraint>
3826          <opt>Engine=InnoDB</opt>
3827          <data>
3828          </data>
3829      </table>
3830  
3831      <table name="vtiger_reportmodules">
3832          <field name="reportmodulesid" type="I" size="19">
3833              <key />
3834          </field>
3835          <field name="primarymodule" type="C" size="50">
3836              <notnull />
3837              <default value="" />
3838          </field>
3839          <field name="secondarymodules" type="C" size="250">
3840              <default value="" />
3841          </field>
3842  
3843          <opt platform="mysql">Engine=InnoDB</opt>
3844      </table>
3845  
3846      <table name="vtiger_reportmodules" alter="true">
3847          <constraint>ADD CONSTRAINT fk_1_vtiger_reportmodules FOREIGN KEY (reportmodulesid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
3848          <opt>Engine=InnoDB</opt>
3849          <data>
3850          </data>
3851      </table>
3852  
3853      <table name="vtiger_reportsortcol">
3854          <field name="sortcolid" type="I" size="19">
3855              <key />
3856          </field>
3857          <field name="reportid" type="I" size="19">
3858              <key />
3859          </field>
3860          <field name="columnname" type="C" size="250">
3861              <default value="" />
3862          </field>
3863          <field name="sortorder" type="C" size="250">
3864              <default value="Asc" />
3865          </field>
3866  
3867          <opt platform="mysql">Engine=InnoDB</opt>
3868      </table>
3869  
3870      <table name="vtiger_reportsortcol" alter="true">
3871          <constraint>ADD CONSTRAINT fk_1_vtiger_reportsortcol FOREIGN KEY (reportid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
3872          <opt>Engine=InnoDB</opt>
3873          <data>
3874          </data>
3875      </table>
3876  
3877      <table name="vtiger_reportdatefilter">
3878          <field name="datefilterid" type="I" size="19">
3879              <key />
3880          </field>
3881          <field name="datecolumnname" type="C" size="250">
3882              <default value="" />
3883          </field>
3884          <field name="datefilter" type="C" size="250">
3885              <default value="" />
3886          </field>
3887          <field name="startdate" type="D">
3888              <default value="NULL" />
3889          </field>
3890          <field name="enddate" type="D">
3891              <default value="NULL" />
3892          </field>
3893  
3894          <index name="reportdatefilter_datefilterid_idx">
3895              <col>datefilterid</col>
3896          </index>
3897          <opt platform="mysql">Engine=InnoDB</opt>
3898      </table>
3899  
3900      <table name="vtiger_reportdatefilter" alter="true">
3901          <constraint>ADD CONSTRAINT fk_1_vtiger_reportdatefilter FOREIGN KEY (datefilterid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
3902          <opt>Engine=InnoDB</opt>
3903          <data>
3904          </data>
3905      </table>
3906  
3907      <table name="vtiger_reportsummary">
3908          <field name="reportsummaryid" type="I" size="19">
3909              <key />
3910          </field>
3911          <field name="summarytype" type="I" size="19">
3912              <key />
3913          </field>
3914          <field name="columnname" type="C" size="250">
3915              <key />
3916              <default value="" />
3917          </field>
3918  
3919          <index name="reportsummary_reportsummaryid_idx">
3920              <col>reportsummaryid</col>
3921          </index>
3922          <opt platform="mysql">Engine=InnoDB</opt>
3923      </table>
3924  
3925      <table name="vtiger_reportsummary" alter="true">
3926          <constraint>ADD CONSTRAINT fk_1_vtiger_reportsummary FOREIGN KEY (reportsummaryid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
3927          <opt>Engine=InnoDB</opt>
3928          <data>
3929          </data>
3930      </table>
3931  
3932          <table name="vtiger_reporttype">
3933              <field name="reportid" type="I" size="10">
3934                      <key />
3935              </field>
3936              <field name="data" type="X" />
3937          </table>
3938          <table name="vtiger_reporttype" alter="true">
3939          <constraint>ADD CONSTRAINT fk_1_vtiger_reporttype FOREIGN KEY (reportid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
3940          <opt>Engine=InnoDB</opt>
3941          <data>
3942          </data>
3943      </table>
3944          
3945      <table name="vtiger_usageunit">
3946          <field name="usageunitid" type="I" size="19">
3947              <key />
3948              <autoincrement />
3949          </field>
3950          <field name="usageunit" type="C" size="200">
3951              <notnull />
3952          </field>
3953          <field name="presence" type="I" size="1">
3954              <notnull />
3955              <default value="1" />
3956          </field>
3957          <field name="picklist_valueid" type="I" size="19">
3958              <notnull />
3959              <default value="0" />
3960          </field>
3961          <field name="sortorderid" type="I" size="11"></field>
3962          <index name="usageunit_usageunit_idx">
3963              <col>usageunit</col>
3964              <unique />
3965          </index>
3966          <opt platform="mysql">Engine=InnoDB</opt>
3967      </table>
3968  
3969      <table name="vtiger_glacct">
3970          <field name="glacctid" type="I" size="19">
3971              <key />
3972              <autoincrement />
3973          </field>
3974          <field name="glacct" type="C" size="200">
3975              <notnull />
3976          </field>
3977          <field name="presence" type="I" size="1">
3978              <notnull />
3979              <default value="1" />
3980          </field>
3981          <field name="picklist_valueid" type="I" size="19">
3982              <notnull />
3983              <default value="0" />
3984          </field>
3985          <field name="sortorderid" type="I" size="11"></field>
3986          <index name="glacct_glacct_idx">
3987              <col>glacct</col>
3988              <unique />
3989          </index>
3990          <opt platform="mysql">Engine=InnoDB</opt>
3991      </table>
3992  
3993      <table name="vtiger_quotestage">
3994          <field name="quotestageid" type="I" size="19">
3995              <key />
3996              <autoincrement />
3997          </field>
3998          <field name="quotestage" type="C" size="200">
3999              <notnull />
4000          </field>
4001          <field name="presence" type="I" size="1">
4002              <notnull />
4003              <default value="1" />
4004          </field>
4005          <field name="picklist_valueid" type="I" size="19">
4006              <notnull />
4007              <default value="0" />
4008          </field>
4009          <field name="sortorderid" type="I" size="11"></field>
4010          <index name="quotestage_quotestage_idx">
4011              <col>quotestage</col>
4012              <unique />
4013          </index>
4014          <opt platform="mysql">Engine=InnoDB</opt>
4015      </table>
4016  
4017      <table name="vtiger_invoicestatus">
4018          <field name="invoicestatusid" type="I" size="19">
4019              <key />
4020              <autoincrement />
4021          </field>
4022          <field name="invoicestatus" type="C" size="200">
4023              <notnull />
4024          </field>
4025          <field name="presence" type="I" size="1">
4026              <notnull />
4027              <default value="1" />
4028          </field>
4029          <field name="picklist_valueid" type="I" size="19">
4030              <notnull />
4031              <default value="0" />
4032          </field>
4033          <field name="sortorderid" type="I" size="11"></field>
4034          <index name="invoicestatus_invoiestatus_idx">
4035              <col>invoicestatus</col>
4036              <unique />
4037          </index>
4038          <opt platform="mysql">Engine=InnoDB</opt>
4039      </table>
4040  
4041      <table name="vtiger_postatus">
4042          <field name="postatusid" type="I" size="19">
4043              <key />
4044              <autoincrement />
4045          </field>
4046          <field name="postatus" type="C" size="200">
4047              <notnull />
4048          </field>
4049          <field name="presence" type="I" size="1">
4050              <notnull />
4051              <default value="1" />
4052          </field>
4053          <field name="picklist_valueid" type="I" size="19">
4054              <notnull />
4055              <default value="0" />
4056          </field>
4057          <field name="sortorderid" type="I" size="11"></field>
4058          <index name="postatus_postatus_idx">
4059              <col>postatus</col>
4060              <unique />
4061          </index>
4062          <opt platform="mysql">Engine=InnoDB</opt>
4063      </table>
4064  
4065      <table name="vtiger_sostatus">
4066          <field name="sostatusid" type="I" size="19">
4067              <key />
4068              <autoincrement />
4069          </field>
4070          <field name="sostatus" type="C" size="200">
4071              <notnull />
4072          </field>
4073          <field name="presence" type="I" size="1">
4074              <notnull />
4075              <default value="1" />
4076          </field>
4077          <field name="picklist_valueid" type="I" size="19">
4078              <notnull />
4079              <default value="0" />
4080          </field>
4081          <field name="sortorderid" type="I" size="11"></field>
4082          <index name="sostatus_sostatus_idx">
4083              <col>sostatus</col>
4084              <unique />
4085          </index>
4086          <opt platform="mysql">Engine=InnoDB</opt>
4087  
4088      </table>
4089  
4090      <table name="vtiger_carrier">
4091          <field name="carrierid" type="I" size="19">
4092              <key />
4093              <autoincrement />
4094          </field>
4095          <field name="carrier" type="C" size="200">
4096              <notnull />
4097          </field>
4098          <field name="presence" type="I" size="1">
4099              <notnull />
4100              <default value="1" />
4101          </field>
4102          <field name="picklist_valueid" type="I" size="19">
4103              <notnull />
4104              <default value="0" />
4105          </field>
4106          <field name="sortorderid" type="I" size="11"></field>
4107          <index name="carrier_carrier_idx">
4108              <col>carrier</col>
4109              <unique />
4110          </index>
4111          <opt platform="mysql">Engine=InnoDB</opt>
4112      </table>
4113  
4114      <table name="vtiger_taxclass">
4115          <field name="taxclassid" type="I" size="19">
4116              <key />
4117              <autoincrement />
4118          </field>
4119          <field name="taxclass" type="C" size="200">
4120              <notnull />
4121          </field>
4122          <field name="sortorderid" type="I" size="19">
4123              <notnull />
4124              <default value="0" />
4125          </field>
4126          <field name="presence" type="I" size="1">
4127              <notnull />
4128              <default value="1" />
4129          </field>
4130  
4131          <index name="taxclass_carrier_idx">
4132              <col>taxclass</col>
4133              <unique />
4134          </index>
4135          <opt platform="mysql">Engine=InnoDB</opt>
4136      </table>
4137  
4138      <table name="vtiger_organizationdetails">
4139          <field name="organization_id" type="I" size="11">
4140              <key />
4141          </field>
4142          <field name="organizationname" type="C" size="60">
4143              <unique />
4144          </field>
4145          <field name="address" type="C" size="150" />
4146          <field name="city" type="C" size="100" />
4147          <field name="state" type="C" size="100" />
4148          <field name="country" type="C" size="100" />
4149          <field name="code" type="C" size="30" />
4150          <field name="phone" type="C" size="30" />
4151          <field name="fax" type="C" size="30" />
4152          <field name="website" type="C" size="100" />
4153          <field name="logoname" type="C" size="50" />
4154          <field name="logo" type="X" />
4155                  <field name="vatid" type="C" size="100" /> 
4156  
4157          <opt platform="mysql">Engine=InnoDB</opt>
4158      </table>
4159  
4160      <table name="vtiger_recurringtype">
4161          <field name="recurringeventid" type="I" size="19">
4162              <key />
4163              <autoincrement />
4164          </field>
4165          <field name="recurringtype" type="C" size="200">
4166              <notnull />
4167          </field>
4168          <field name="sortorderid" type="I" size="19">
4169              <notnull />
4170              <default value="0" />
4171          </field>
4172          <field name="presence" type="I" size="1">
4173              <notnull />
4174              <default value="1" />
4175          </field>
4176  
4177          <index name="recurringtype_status_idx">
4178              <col>recurringtype</col>
4179              <unique />
4180          </index>
4181          <opt platform="mysql">Engine=InnoDB</opt>
4182      </table>
4183  
4184      <table name="vtiger_recurringevents">
4185          <field name="recurringid" type="I" size="19">
4186              <key />
4187              <autoincrement />
4188          </field>
4189          <field name="activityid" type="I" size="19">
4190              <notnull />
4191          </field>
4192          <field name="recurringdate" type="D" />
4193          <field name="recurringtype" type="C" size="30" />
4194          <field name="recurringfreq" type="I" size="19" />
4195          <field name="recurringinfo" type="C" size="50" />
4196  
4197          <opt platform="mysql">Engine=InnoDB</opt>
4198      </table>
4199  
4200      <table name="vtiger_recurringevents" alter="true">
4201          <constraint>ADD CONSTRAINT fk_1_vtiger_recurringevents FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
4202          <opt>Engine=InnoDB</opt>
4203          <data>
4204          </data>
4205      </table>
4206  
4207      <table name="vtiger_inventorynotification">
4208          <field name="notificationid" type="I" size="19">
4209              <key />
4210              <autoincrement />
4211          </field>
4212          <field name="notificationname" type="C" size="200" />
4213          <field name="notificationsubject" type="C" size="200" />
4214          <field name="notificationbody" type="X" />
4215          <field name="label" type="C" size="50" />
4216          <field name="status" type="C" size="30" />
4217  
4218          <opt platform="mysql">Engine=InnoDB</opt>
4219      </table>
4220  
4221      <table name="vtiger_inventory_tandc">
4222          <field name="id" type="I" size="19">
4223              <key />
4224          </field>
4225          <field name="type" type="C" size="30">
4226              <notnull />
4227          </field>
4228          <field name="tandc" type="X" />
4229          <opt platform="mysql">Engine=InnoDB</opt>
4230      </table>
4231  
4232      <table name="vtiger_convertleadmapping">
4233          <field name="cfmid" type="I" size="19">
4234              <key />
4235              <autoincrement />
4236          </field>
4237          <field name="leadfid" type="I" size="19">
4238              <notnull />
4239          </field>
4240          <field name="accountfid" type="I" size="19" />
4241          <field name="contactfid" type="I" size="19" />
4242          <field name="potentialfid" type="I" size="19" />
4243          <field name="editable" type="I" size="19">
4244              <default value="1" />
4245          </field>
4246          <opt platform="mysql">Engine=InnoDB</opt>
4247      </table>
4248  
4249      <table name="vtiger_actionmapping">
4250          <field name="actionid" type="I" size="19">
4251              <key />
4252          </field>
4253          <field name="actionname" type="C" size="200">
4254              <key />
4255          </field>
4256          <field name="securitycheck" type="I" size="19" />
4257  
4258          <opt platform="mysql">Engine=InnoDB</opt>
4259      </table>
4260  
4261      <table name="vtiger_org_share_action2tab">
4262          <field name="share_action_id" type="I" size="19">
4263              <key />
4264          </field>
4265          <field name="tabid" type="I" size="19">
4266              <key />
4267          </field>
4268  
4269          <opt platform="mysql">Engine=InnoDB</opt>
4270      </table>
4271  
4272      <table name="vtiger_org_share_action2tab" alter="true">
4273          <constraint>ADD CONSTRAINT fk_1_vtiger_org_share_action2tab FOREIGN KEY (share_action_id) REFERENCES vtiger_org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
4274          <constraint>ADD CONSTRAINT fk_2_vtiger_org_share_action2tab FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4275          <opt>Engine=InnoDB</opt>
4276          <data>
4277          </data>
4278      </table>
4279  
4280      <table name="vtiger_datashare_module_rel">
4281          <field name="shareid" type="I" size="19">
4282              <key />
4283          </field>
4284          <field name="tabid" type="I" size="19">
4285              <notnull />
4286          </field>
4287          <field name="relationtype" type="C" size="200">
4288          </field>
4289          <opt platform="mysql">Engine=InnoDB</opt>
4290          <index name="idx_datashare_module_rel_tabid">
4291              <col>tabid</col>
4292          </index>
4293      </table>
4294  
4295      <table name="vtiger_datashare_module_rel" alter="true">
4296          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_module_rel FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4297          <opt>Engine=InnoDB</opt>
4298          <data>
4299          </data>
4300      </table>
4301  
4302      <table name="vtiger_datashare_grp2grp">
4303          <field name="shareid" type="I" size="19">
4304              <key />
4305          </field>
4306          <field name="share_groupid" type="I" size="19">
4307          </field>
4308          <field name="to_groupid" type="I" size="19">
4309          </field>
4310          <field name="permission" type="I" size="19" />
4311  
4312          <index name="datashare_grp2grp_share_groupid_idx">
4313              <col>share_groupid</col>
4314          </index>
4315          <index name="datashare_grp2grp_to_groupid_idx">
4316              <col>to_groupid</col>
4317          </index>
4318          <opt platform="mysql">Engine=InnoDB</opt>
4319      </table>
4320  
4321      <table name="vtiger_datashare_grp2grp" alter="true">
4322          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_grp2grp FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4323          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_grp2grp FOREIGN KEY (share_groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4324          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_grp2grp FOREIGN KEY (to_groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4325          <opt>Engine=InnoDB</opt>
4326          <data>
4327          </data>
4328      </table>
4329  
4330      <table name="vtiger_datashare_grp2role">
4331          <field name="shareid" type="I" size="19">
4332              <key />
4333          </field>
4334          <field name="share_groupid" type="I" size="19">
4335          </field>
4336          <field name="to_roleid" type="C" size="255">
4337          </field>
4338          <field name="permission" type="I" size="19" />
4339  
4340          <index name="idx_datashare_grp2role_share_groupid">
4341              <col>share_groupid</col>
4342          </index>
4343          <index name="idx_datashare_grp2role_to_roleid">
4344              <col>to_roleid</col>
4345          </index>
4346          <opt platform="mysql">Engine=InnoDB</opt>
4347      </table>
4348  
4349      <table name="vtiger_datashare_grp2role" alter="true">
4350          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_grp2role FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4351          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_grp2role FOREIGN KEY (share_groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4352          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_grp2role FOREIGN KEY (to_roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4353          <opt>Engine=InnoDB</opt>
4354          <data>
4355          </data>
4356      </table>
4357  
4358      <table name="vtiger_datashare_grp2rs">
4359          <field name="shareid" type="I" size="19">
4360              <key />
4361          </field>
4362          <field name="share_groupid" type="I" size="19">
4363          </field>
4364          <field name="to_roleandsubid" type="C" size="255">
4365          </field>
4366          <field name="permission" type="I" size="19" />
4367  
4368          <index name="datashare_grp2rs_share_groupid_idx">
4369              <col>share_groupid</col>
4370          </index>
4371          <index name="datashare_grp2rs_to_roleandsubid_idx">
4372              <col>to_roleandsubid</col>
4373          </index>
4374          <opt platform="mysql">Engine=InnoDB</opt>
4375      </table>
4376  
4377      <table name="vtiger_datashare_grp2rs" alter="true">
4378          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_grp2rs FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4379          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_grp2rs FOREIGN KEY (share_groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4380          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_grp2rs FOREIGN KEY (to_roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4381          <opt>Engine=InnoDB</opt>
4382          <data>
4383          </data>
4384      </table>
4385  
4386      <table name="vtiger_datashare_role2group">
4387          <field name="shareid" type="I" size="19">
4388              <key />
4389          </field>
4390          <field name="share_roleid" type="C" size="255">
4391          </field>
4392          <field name="to_groupid" type="I" size="19">
4393          </field>
4394          <field name="permission" type="I" size="19" />
4395  
4396          <index name="idx_datashare_role2group_share_roleid">
4397              <col>share_roleid</col>
4398          </index>
4399          <index name="idx_datashare_role2group_to_groupid">
4400              <col>to_groupid</col>
4401          </index>
4402          <opt platform="mysql">Engine=InnoDB</opt>
4403      </table>
4404  
4405      <table name="vtiger_datashare_role2group" alter="true">
4406          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_role2group FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4407          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_role2group FOREIGN KEY (to_groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4408          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_role2group FOREIGN KEY (share_roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4409          <opt>Engine=InnoDB</opt>
4410          <data>
4411          </data>
4412      </table>
4413  
4414      <table name="vtiger_datashare_role2role">
4415          <field name="shareid" type="I" size="19">
4416              <key />
4417          </field>
4418          <field name="share_roleid" type="C" size="255">
4419          </field>
4420          <field name="to_roleid" type="C" size="255">
4421          </field>
4422          <field name="permission" type="I" size="19" />
4423  
4424          <index name="datashare_role2role_share_roleid_idx">
4425              <col>share_roleid</col>
4426          </index>
4427          <index name="datashare_role2role_to_roleid_idx">
4428              <col>to_roleid</col>
4429          </index>
4430          <opt platform="mysql">Engine=InnoDB</opt>
4431      </table>
4432  
4433      <table name="vtiger_datashare_role2role" alter="true">
4434          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_role2role FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4435          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_role2role FOREIGN KEY (share_roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4436          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_role2role FOREIGN KEY (to_roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4437          <opt>Engine=InnoDB</opt>
4438          <data>
4439          </data>
4440      </table>
4441  
4442      <table name="vtiger_datashare_role2rs">
4443          <field name="shareid" type="I" size="19">
4444              <key />
4445          </field>
4446          <field name="share_roleid" type="C" size="255">
4447          </field>
4448          <field name="to_roleandsubid" type="C" size="255">
4449          </field>
4450          <field name="permission" type="I" size="19" />
4451  
4452          <index name="datashare_role2s_share_roleid_idx">
4453              <col>share_roleid</col>
4454          </index>
4455          <index name="datashare_role2s_to_roleandsubid_idx">
4456              <col>to_roleandsubid</col>
4457          </index>
4458          <opt platform="mysql">Engine=InnoDB</opt>
4459      </table>
4460  
4461      <table name="vtiger_datashare_role2rs" alter="true">
4462          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_role2rs FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4463          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_role2rs FOREIGN KEY (share_roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4464          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_role2rs FOREIGN KEY (to_roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4465          <opt>Engine=InnoDB</opt>
4466          <data>
4467          </data>
4468      </table>
4469  
4470      <table name="vtiger_datashare_rs2grp">
4471          <field name="shareid" type="I" size="19">
4472              <key />
4473          </field>
4474          <field name="share_roleandsubid" type="C" size="255">
4475          </field>
4476          <field name="to_groupid" type="I" size="19">
4477          </field>
4478          <field name="permission" type="I" size="19" />
4479  
4480          <index name="datashare_rs2grp_share_roleandsubid_idx">
4481              <col>share_roleandsubid</col>
4482          </index>
4483          <index name="datashare_rs2grp_to_groupid_idx">
4484              <col>to_groupid</col>
4485          </index>
4486          <opt platform="mysql">Engine=InnoDB</opt>
4487      </table>
4488  
4489      <table name="vtiger_datashare_rs2grp" alter="true">
4490          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_rs2grp FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4491          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_rs2grp FOREIGN KEY (to_groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4492          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_rs2grp FOREIGN KEY (share_roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4493          <opt>Engine=InnoDB</opt>
4494          <data>
4495          </data>
4496      </table>
4497  
4498      <table name="vtiger_datashare_rs2role">
4499          <field name="shareid" type="I" size="19">
4500              <key />
4501          </field>
4502          <field name="share_roleandsubid" type="C" size="255">
4503          </field>
4504          <field name="to_roleid" type="C" size="255">
4505          </field>
4506          <field name="permission" type="I" size="19" />
4507  
4508          <index name="datashare_rs2role_share_roleandsubid_idx">
4509              <col>share_roleandsubid</col>
4510          </index>
4511          <index name="datashare_rs2role_to_roleid_idx">
4512              <col>to_roleid</col>
4513          </index>
4514          <opt platform="mysql">Engine=InnoDB</opt>
4515      </table>
4516  
4517      <table name="vtiger_datashare_rs2role" alter="true">
4518          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_rs2role FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4519          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_rs2role FOREIGN KEY (share_roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4520          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_rs2role FOREIGN KEY (to_roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4521          <opt>Engine=InnoDB</opt>
4522          <data>
4523          </data>
4524      </table>
4525  
4526      <table name="vtiger_datashare_rs2rs">
4527          <field name="shareid" type="I" size="19">
4528              <key />
4529          </field>
4530          <field name="share_roleandsubid" type="C" size="255">
4531          </field>
4532          <field name="to_roleandsubid" type="C" size="255">
4533          </field>
4534          <field name="permission" type="I" size="19" />
4535  
4536          <index name="datashare_rs2rs_share_roleandsubid_idx">
4537              <col>share_roleandsubid</col>
4538          </index>
4539          <index name="idx_datashare_rs2rs_to_roleandsubid_idx">
4540              <col>to_roleandsubid</col>
4541          </index>
4542          <opt platform="mysql">Engine=InnoDB</opt>
4543      </table>
4544  
4545      <table name="vtiger_datashare_rs2rs" alter="true">
4546          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_rs2rs FOREIGN KEY (shareid) REFERENCES vtiger_datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
4547          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_rs2rs FOREIGN KEY (share_roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4548          <constraint>ADD CONSTRAINT fk_3_vtiger_datashare_rs2rs FOREIGN KEY (to_roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
4549          <opt>Engine=InnoDB</opt>
4550          <data>
4551          </data>
4552      </table>
4553  
4554      <table name="vtiger_datashare_relatedmodules">
4555          <field name="datashare_relatedmodule_id" type="I" size="19">
4556              <key />
4557          </field>
4558          <field name="tabid" type="I" size="19">
4559          </field>
4560          <field name="relatedto_tabid" type="I" size="19">
4561          </field>
4562          <index name="datashare_relatedmodules_tabid_idx">
4563              <col>tabid</col>
4564          </index>
4565          <index name="datashare_relatedmodules_relatedto_tabid_idx">
4566              <col>relatedto_tabid</col>
4567          </index>
4568          <opt platform="mysql">Engine=InnoDB</opt>
4569      </table>
4570  
4571      <table name="vtiger_datashare_relatedmodules" alter="true">
4572          <constraint>ADD CONSTRAINT fk_1_vtiger_datashare_relatedmodules FOREIGN KEY (relatedto_tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4573          <constraint>ADD CONSTRAINT fk_2_vtiger_datashare_relatedmodules FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4574          <opt>Engine=InnoDB</opt>
4575          <data>
4576          </data>
4577      </table>
4578  
4579      <table name="vtiger_datashare_relatedmodule_permission">
4580          <field name="shareid" type="I" size="19">
4581              <key />
4582          </field>
4583          <field name="datashare_relatedmodule_id" type="I" size="19">
4584              <key />
4585          </field>
4586          <field name="permission" type="I" size="19" />
4587  
4588          <index name="datashare_relatedmodule_permission_shareid_permissions_idx">
4589              <col>shareid</col>
4590              <col>permission</col>
4591          </index>
4592          <opt platform="mysql">Engine=InnoDB</opt>
4593      </table>
4594  
4595      <table name="vtiger_parenttab">
4596          <field name="parenttabid" type="I" size="19">
4597              <notnull />
4598              <key />
4599          </field>
4600          <field name="parenttab_label" type="C" size="100">
4601              <notnull />
4602          </field>
4603          <field name="sequence" type="I" size="10">
4604              <notnull />
4605          </field>
4606          <field name="visible" type="I" size="2">
4607              <notnull />
4608              <default value="0" />
4609          </field>
4610          <index name="parenttab_parenttabid_parenttabl_label_visible_idx">
4611              <col>parenttabid</col>
4612              <col>parenttab_label</col>
4613              <col>visible</col>
4614          </index>
4615          <opt platform="mysql">Engine=InnoDB</opt>
4616      </table>
4617  
4618      <table name="vtiger_tmp_read_user_sharing_per">
4619          <field name="userid" type="I" size="11">
4620              <key />
4621          </field>
4622          <field name="tabid" type="I" size="11">
4623              <key />
4624          </field>
4625          <field name="shareduserid" type="I" size="11">
4626              <key />
4627          </field>
4628  
4629          <index name="tmp_read_user_sharing_per_userid_shareduserid_idx">
4630              <col>userid</col>
4631              <col>shareduserid</col>
4632          </index>
4633          <opt platform="mysql">Engine=InnoDB</opt>
4634      </table>
4635  
4636      <table name="vtiger_tmp_read_user_sharing_per" alter="true">
4637          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_read_user_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4638          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_read_user_sharing_per FOREIGN KEY (shareduserid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4639          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_read_user_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4640          <opt>Engine=InnoDB</opt>
4641          <data>
4642          </data>
4643      </table>
4644  
4645      <table name="vtiger_tmp_read_group_sharing_per">
4646          <field name="userid" type="I" size="11">
4647              <key />
4648          </field>
4649          <field name="tabid" type="I" size="11">
4650              <key />
4651          </field>
4652          <field name="sharedgroupid" type="I" size="11">
4653              <key />
4654          </field>
4655  
4656          <index name="tmp_read_group_sharing_per_userid_sharedgroupid_idx">
4657              <col>userid</col>
4658              <col>sharedgroupid</col>
4659          </index>
4660          <opt platform="mysql">Engine=InnoDB</opt>
4661      </table>
4662  
4663      <table name="vtiger_tmp_read_group_sharing_per" alter="true">
4664          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_read_group_sharing_per FOREIGN KEY (sharedgroupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4665          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_read_group_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4666          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_read_group_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4667          <opt>Engine=InnoDB</opt>
4668          <data>
4669          </data>
4670      </table>
4671  
4672      <table name="vtiger_tmp_write_user_sharing_per">
4673          <field name="userid" type="I" size="11">
4674              <key />
4675          </field>
4676          <field name="tabid" type="I" size="11">
4677              <key />
4678          </field>
4679          <field name="shareduserid" type="I" size="11">
4680              <key />
4681          </field>
4682  
4683          <index name="tmp_write_user_sharing_per_userid_shareduserid_idx">
4684              <col>userid</col>
4685              <col>shareduserid</col>
4686          </index>
4687          <opt platform="mysql">Engine=InnoDB</opt>
4688      </table>
4689  
4690      <table name="vtiger_tmp_write_user_sharing_per" alter="true">
4691          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_write_user_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4692          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_write_user_sharing_per FOREIGN KEY (shareduserid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4693          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_write_user_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4694          <opt>Engine=InnoDB</opt>
4695          <data>
4696          </data>
4697      </table>
4698  
4699      <table name="vtiger_tmp_write_group_sharing_per">
4700          <field name="userid" type="I" size="11">
4701              <key />
4702          </field>
4703          <field name="tabid" type="I" size="11">
4704              <key />
4705          </field>
4706          <field name="sharedgroupid" type="I" size="11">
4707              <key />
4708          </field>
4709  
4710          <index name="tmp_write_group_sharing_per_UK1">
4711              <col>userid</col>
4712              <col>sharedgroupid</col>
4713          </index>
4714          <opt platform="mysql">Engine=InnoDB</opt>
4715      </table>
4716  
4717      <table name="vtiger_tmp_write_group_sharing_per" alter="true">
4718          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_write_group_sharing_per FOREIGN KEY (sharedgroupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4719          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_write_group_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4720          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_write_group_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4721          <opt>Engine=InnoDB</opt>
4722          <data>
4723          </data>
4724      </table>
4725  
4726      <table name="vtiger_tmp_read_user_rel_sharing_per">
4727          <field name="userid" type="I" size="11">
4728              <key />
4729          </field>
4730          <field name="tabid" type="I" size="11">
4731              <key />
4732          </field>
4733          <field name="relatedtabid" type="I" size="11">
4734              <key />
4735          </field>
4736          <field name="shareduserid" type="I" size="11">
4737              <key />
4738          </field>
4739  
4740          <index name="tmp_read_user_rel_sharing_per_userid_shared_reltabid_idx">
4741              <col>userid</col>
4742              <col>shareduserid</col>
4743              <col>relatedtabid</col>
4744          </index>
4745          <opt platform="mysql">Engine=InnoDB</opt>
4746      </table>
4747  
4748      <table name="vtiger_tmp_read_user_rel_sharing_per" alter="true">
4749          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_read_user_rel_sharing_per FOREIGN KEY (relatedtabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4750          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_read_user_rel_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4751          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_read_user_rel_sharing_per FOREIGN KEY (shareduserid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4752          <constraint>ADD CONSTRAINT fk_4_vtiger_tmp_read_user_rel_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4753          <opt>Engine=InnoDB</opt>
4754          <data>
4755          </data>
4756      </table>
4757  
4758      <table name="vtiger_tmp_read_group_rel_sharing_per">
4759          <field name="userid" type="I" size="11">
4760              <key />
4761          </field>
4762          <field name="tabid" type="I" size="11">
4763              <key />
4764          </field>
4765          <field name="relatedtabid" type="I" size="11">
4766              <key />
4767          </field>
4768          <field name="sharedgroupid" type="I" size="11">
4769              <key />
4770          </field>
4771  
4772          <index name="tmp_read_group_rel_sharing_per_userid_sharedgroupid_tabid">
4773              <col>userid</col>
4774              <col>sharedgroupid</col>
4775              <col>tabid</col>
4776          </index>
4777          <opt platform="mysql">Engine=InnoDB</opt>
4778      </table>
4779  
4780      <table name="vtiger_tmp_read_group_rel_sharing_per" alter="true">
4781          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_read_group_rel_sharing_per FOREIGN KEY (sharedgroupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4782          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_read_group_rel_sharing_per FOREIGN KEY (relatedtabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4783          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_read_group_rel_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4784          <constraint>ADD CONSTRAINT fk_4_vtiger_tmp_read_group_rel_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4785          <opt>Engine=InnoDB</opt>
4786          <data>
4787          </data>
4788      </table>
4789  
4790      <table name="vtiger_tmp_write_user_rel_sharing_per">
4791          <field name="userid" type="I" size="11">
4792              <key />
4793          </field>
4794          <field name="tabid" type="I" size="11">
4795              <key />
4796          </field>
4797          <field name="relatedtabid" type="I" size="11">
4798              <key />
4799          </field>
4800          <field name="shareduserid" type="I" size="11">
4801              <key />
4802          </field>
4803  
4804          <index name="tmp_write_user_rel_sharing_per_userid_sharduserid_tabid_idx">
4805              <col>userid</col>
4806              <col>shareduserid</col>
4807              <col>tabid</col>
4808          </index>
4809          <opt platform="mysql">Engine=InnoDB</opt>
4810      </table>
4811  
4812      <table name="vtiger_tmp_write_user_rel_sharing_per" alter="true">
4813          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_write_user_rel_sharing_per FOREIGN KEY (relatedtabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4814          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_write_user_rel_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4815          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_write_user_rel_sharing_per FOREIGN KEY (shareduserid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4816          <constraint>ADD CONSTRAINT fk_4_vtiger_tmp_write_user_rel_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4817          <opt>Engine=InnoDB</opt>
4818          <data>
4819          </data>
4820      </table>
4821  
4822      <table name="vtiger_tmp_write_group_rel_sharing_per">
4823          <field name="userid" type="I" size="11">
4824              <key />
4825          </field>
4826          <field name="tabid" type="I" size="11">
4827              <key />
4828          </field>
4829          <field name="relatedtabid" type="I" size="11">
4830              <key />
4831          </field>
4832          <field name="sharedgroupid" type="I" size="11">
4833              <key />
4834          </field>
4835  
4836          <index name="tmp_write_group_rel_sharing_per_userid_sharedgroupid_tabid_idx">
4837              <col>userid</col>
4838              <col>sharedgroupid</col>
4839              <col>tabid</col>
4840          </index>
4841          <opt platform="mysql">Engine=InnoDB</opt>
4842      </table>
4843  
4844      <table name="vtiger_tmp_write_group_rel_sharing_per" alter="true">
4845          <constraint>ADD CONSTRAINT fk_1_vtiger_tmp_write_group_rel_sharing_per FOREIGN KEY (sharedgroupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
4846          <constraint>ADD CONSTRAINT fk_2_vtiger_tmp_write_group_rel_sharing_per FOREIGN KEY (relatedtabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4847          <constraint>ADD CONSTRAINT fk_3_vtiger_tmp_write_group_rel_sharing_per FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4848          <constraint>ADD CONSTRAINT fk_4_vtiger_tmp_write_group_rel_sharing_per FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
4849          <opt>Engine=InnoDB</opt>
4850          <data>
4851          </data>
4852      </table>
4853  
4854      <table name="vtiger_parenttabrel">
4855          <field name="parenttabid" type="I" size="19">
4856              <notnull />
4857          </field>
4858          <field name="tabid" type="I" size="19">
4859              <notnull />
4860          </field>
4861          <field name="sequence" type="I" size="3">
4862              <notnull />
4863          </field>
4864  
4865          <index name="parenttabrel_tabid_parenttabid_idx">
4866              <col>tabid</col>
4867              <col>parenttabid</col>
4868          </index>
4869          <opt platform="mysql">Engine=InnoDB</opt>
4870      </table>
4871  
4872      <table name="vtiger_parenttabrel" alter="true">
4873          <constraint>ADD CONSTRAINT fk_1_vtiger_parenttabrel FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
4874          <opt>Engine=InnoDB</opt>
4875          <data>
4876          </data>
4877      </table>
4878  
4879      <table name="vtiger_parenttabrel" alter="true">
4880          <constraint>ADD CONSTRAINT fk_2_vtiger_parenttabrel FOREIGN KEY (parenttabid) REFERENCES vtiger_parenttab(parenttabid) ON DELETE CASCADE</constraint>
4881          <opt>Engine=InnoDB</opt>
4882          <data>
4883          </data>
4884      </table>
4885  
4886      <table name="vtiger_campaigntype">
4887          <field name="campaigntypeid" type="I" size="19">
4888              <key />
4889              <autoincrement />
4890          </field>
4891          <field name="campaigntype" type="C" size="200">
4892              <notnull />
4893          </field>
4894          <field name="presence" type="I" size="1">
4895              <notnull />
4896              <default value="1" />
4897          </field>
4898          <field name="picklist_valueid" type="I" size="19">
4899              <notnull />
4900              <default value="0" />
4901          </field>
4902          <field name="sortorderid" type="I" size="11"></field>
4903          <index name="campaigntype_campaigntype_idx">
4904              <col>campaigntype</col>
4905              <unique />
4906          </index>
4907          <opt platform="mysql">Engine=InnoDB</opt>
4908      </table>
4909  
4910      <table name="vtiger_campaignstatus">
4911          <field name="campaignstatusid" type="I" size="19">
4912              <key />
4913              <autoincrement />
4914          </field>
4915          <field name="campaignstatus" type="C" size="200">
4916              <notnull />
4917          </field>
4918          <field name="presence" type="I" size="1">
4919              <notnull />
4920              <default value="1" />
4921          </field>
4922          <field name="picklist_valueid" type="I" size="19">
4923              <notnull />
4924              <default value="0" />
4925          </field>
4926          <field name="sortorderid" type="I" size="11"></field>
4927          <index name="campaignstatus_campaignstatus_idx">
4928              <col>campaignstatus</col>
4929          </index>
4930          <opt platform="mysql">Engine=InnoDB</opt>
4931      </table>
4932  
4933      <table name="vtiger_expectedresponse">
4934          <field name="expectedresponseid" type="I" size="19">
4935              <key />
4936              <autoincrement />
4937          </field>
4938          <field name="expectedresponse" type="C" size="200">
4939              <notnull />
4940          </field>
4941          <field name="presence" type="I" size="1">
4942              <notnull />
4943              <default value="1" />
4944          </field>
4945          <field name="picklist_valueid" type="I" size="19">
4946              <notnull />
4947              <default value="0" />
4948          </field>
4949          <field name="sortorderid" type="I" size="11"></field>
4950          <index name="CampaignExpRes_UK01">
4951              <col>expectedresponse</col>
4952              <unique />
4953          </index>
4954          <opt platform="mysql">Engine=InnoDB</opt>
4955      </table>
4956      <table name="vtiger_picklist">
4957          <field name="picklistid" type="I" size="11">
4958              <key />
4959              <autoincrement />
4960          </field>
4961          <field name="name" type="C" size="200">
4962              <notnull />
4963          </field>
4964          <index name="picklist_name_idx">
4965              <col>name</col>
4966              <unique />
4967          </index>
4968          <opt platform="mysql">Engine=InnoDB</opt>
4969      </table>
4970      <table name="vtiger_role2picklist">
4971          <field name="roleid" type="C" size="255">
4972              <key />
4973          </field>
4974          <field name="picklistvalueid" type="I" size="11">
4975              <key />
4976          </field>
4977          <field name="picklistid" type="I" size="11">
4978              <key />
4979          </field>
4980          <field name="sortid" type="I" size="11" />
4981  
4982          <index name="role2picklist_roleid_picklistid_idx">
4983              <col>roleid</col>
4984              <col>picklistid</col>
4985              <col>picklistvalueid</col>
4986          </index>
4987          <opt platform="mysql">Engine=InnoDB</opt>
4988      </table>
4989      <table name="vtiger_role2picklist" alter="true">
4990          <constraint>ADD CONSTRAINT fk_1_vtiger_role2picklist FOREIGN KEY (roleid) REFERENCES vtiger_role (roleid) ON DELETE CASCADE</constraint>
4991          <opt>Engine=InnoDB</opt>
4992          <data>
4993          </data>
4994      </table>
4995      <table name="vtiger_role2picklist" alter="true">
4996          <constraint>ADD CONSTRAINT fk_2_vtiger_role2picklist FOREIGN KEY (picklistid) REFERENCES vtiger_picklist (picklistid) ON DELETE CASCADE</constraint>
4997          <opt>Engine=InnoDB</opt>
4998          <data>
4999          </data>
5000      </table>
5001      <table name="vtiger_portal">
5002          <field name="portalid" type="I" size="19">
5003              <key />
5004          </field>
5005          <field name="portalname" type="C" size="200">
5006              <notnull />
5007          </field>
5008          <field name="portalurl" type="C" size="255">
5009              <notnull />
5010          </field>
5011          <field name="sequence" type="I" size="3">
5012              <notnull />
5013          </field>
5014          <field name="setdefault" type="I" size="3">
5015              <notnull />
5016              <default value="0" />
5017          </field>
5018          <index name="portal_portalname_idx">
5019              <col>portalname</col>
5020          </index>
5021          <opt platform="mysql">Engine=InnoDB</opt>
5022      </table>
5023  
5024      <table name="vtiger_soapservice">
5025          <field name="id" type="I" size="19">
5026              <default value="NULL" />
5027          </field>
5028          <field name="type" type="C" size="25">
5029              <default value="NULL" />
5030          </field>
5031          <field name="sessionid" type="C" size="100">
5032              <default value="NULL" />
5033          </field>
5034          <opt platform="mysql">Engine=InnoDB</opt>
5035      </table>
5036  
5037      <table name="vtiger_announcement">
5038          <field name="creatorid" type="I" size="19">
5039              <key />
5040          </field>
5041          <field name="announcement" type="X" />
5042          <field name="title" type="C" size="255" />
5043          <field name="time" type="T">
5044              <deftimestamp />
5045          </field>
5046  
5047          <index name="announcement_creatorid_idx">
5048              <col>creatorid</col>
5049          </index>
5050          <opt platform="mysql">Engine=InnoDB</opt>
5051      </table>
5052  
5053      <table name="vtiger_freetags">
5054          <field name="id" type="I" size="19">
5055              <notnull />
5056              <key />
5057          </field>
5058          <field name="tag" type="C" size="50">
5059              <notnull />
5060              <default value="" />
5061          </field>
5062          <field name="raw_tag" type="C" size="50">
5063              <notnull />
5064              <default value="" />
5065          </field>
5066          <opt platform="mysql">Engine=InnoDB</opt>
5067      </table>
5068  
5069      <table name="vtiger_freetagged_objects">
5070          <field name="tag_id" type="I" size="20">
5071              <notnull />
5072              <default value="0" />
5073              <key />
5074          </field>
5075          <field name="tagger_id" type="I" size="20">
5076              <notnull />
5077              <default value="0" />
5078              <key />
5079          </field>
5080          <field name="object_id" type="I" size="20">
5081              <notnull />
5082              <default value="0" />
5083              <key />
5084          </field>
5085          <field name="tagged_on" type="T">
5086              <deftimestamp />
5087              <notnull />
5088          </field>
5089          <field name="module" type="C" size="50">
5090              <default value="" />
5091              <notnull />
5092          </field>
5093  
5094          <index name="freetagged_objects_tag_id_tagger_id_object_id_idx">
5095              <col>tag_id</col>
5096              <col>tagger_id</col>
5097              <col>object_id</col>
5098          </index>
5099          <opt platform="mysql">Engine=InnoDB</opt>
5100      </table>
5101  
5102      <table name="vtiger_emaildetails">
5103          <field name="emailid" type="I" size="19">
5104              <notnull />
5105              <key />
5106          </field>
5107          <field name="from_email" type="C" size="50">
5108              <notnull />
5109              <default value="" />
5110          </field>
5111          <field name="to_email" type="X">
5112              <notnull />
5113          </field>
5114          <field name="cc_email" type="X">
5115              <notnull />
5116          </field>
5117          <field name="bcc_email" type="X">
5118              <notnull />
5119          </field>
5120          <field name="assigned_user_email" type="C" size="50">
5121              <notnull />
5122              <default value="" />
5123          </field>
5124          <field name="idlists" type="X">
5125              <notnull />
5126              <default value="" />
5127          </field>
5128          <field name="email_flag" type="C" size="50">
5129              <notnull />
5130              <default value="" />
5131          </field>
5132          <opt platform="mysql">Engine=InnoDB</opt>
5133      </table>
5134  
5135      <table name="vtiger_invitees">
5136          <field name="activityid" type="I" size="19">
5137              <KEY/>
5138          </field>
5139          <field name="inviteeid" type="I" size="19">
5140              <KEY/>
5141          </field>
5142          <opt platform="mysql">Engine=InnoDB</opt>
5143      </table>
5144  
5145      <table name="vtiger_inventorytaxinfo">
5146          <field name="taxid" type="I" size="3">
5147              <KEY/>
5148              <notnull />
5149          </field>
5150          <field name="taxname" type="C" size="50">
5151          </field>
5152          <field name="taxlabel" type="C" size="50">
5153          </field>
5154          <field name="percentage" type="N" size="7.3">
5155          </field>
5156          <field name="deleted" type="I" size="1" />
5157  
5158          <index name="inventorytaxinfo_taxname_idx">
5159              <col>taxname</col>
5160          </index>
5161  
5162          <opt platform="mysql">Engine=InnoDB</opt>
5163      </table>
5164  
5165      <table name="vtiger_producttaxrel">
5166          <field name="productid" type="I" size="11">
5167              <notnull />
5168          </field>
5169          <field name="taxid" type="I" size="3">
5170              <notnull />
5171          </field>
5172          <field name="taxpercentage" type="N" size="7.3">
5173          </field>
5174  
5175          <index name="producttaxrel_productid_idx">
5176              <col>productid</col>
5177          </index>
5178          <index name="producttaxrel_taxid_idx">
5179              <col>taxid</col>
5180          </index>
5181  
5182          <opt platform="mysql">Engine=InnoDB</opt>
5183      </table>
5184  
5185      <table name="vtiger_status">
5186          <field name="statusid" type="I" size="19">
5187              <key />
5188              <autoincrement />
5189          </field>
5190          <field name="status" type="C" size="200">
5191              <notnull />
5192          </field>
5193          <field name="presence" type="I" size="1">
5194              <notnull />
5195              <default value="1" />
5196          </field>
5197          <field name="picklist_valueid" type="I" size="19">
5198              <notnull />
5199              <default value="0" />
5200          </field>
5201          <index name="vtiger_status_status_idx">
5202              <col>source</col>
5203              <unique />
5204          </index>
5205          <opt platform="mysql">Engine=InnoDB</opt>
5206      </table>
5207  
5208      <table name="vtiger_activity_view">
5209          <field name="activity_viewid" type="I" size="19">
5210              <key />
5211              <autoincrement />
5212          </field>
5213          <field name="activity_view" type="C" size="200">
5214              <notnull />
5215          </field>
5216          <field name="sortorderid" type="I" size="19">
5217              <notnull />
5218              <default value="0" />
5219          </field>
5220          <field name="presence" type="I" size="1">
5221              <notnull />
5222              <default value="1" />
5223          </field>
5224  
5225          <index name="vtiger_activity_view_status_idx">
5226              <col>source</col>
5227              <unique />
5228          </index>
5229          <opt platform="mysql">Engine=InnoDB</opt>
5230      </table>
5231  
5232      <table name="vtiger_lead_view">
5233          <field name="lead_viewid" type="I" size="19">
5234              <key />
5235              <autoincrement />
5236          </field>
5237          <field name="lead_view" type="C" size="200">
5238              <notnull />
5239          </field>
5240          <field name="sortorderid" type="I" size="19">
5241              <notnull />
5242              <default value="0" />
5243          </field>
5244          <field name="presence" type="I" size="1">
5245              <notnull />
5246              <default value="1" />
5247          </field>
5248  
5249          <index name="vtiger_lead_viewstatus_idx">
5250              <col>source</col>
5251              <unique />
5252          </index>
5253          <opt platform="mysql">Engine=InnoDB</opt>
5254      </table>
5255  
5256      <table name="vtiger_date_format">
5257          <field name="date_formatid" type="I" size="19">
5258              <key />
5259              <autoincrement />
5260          </field>
5261          <field name="date_format" type="C" size="200">
5262              <notnull />
5263          </field>
5264          <field name="sortorderid" type="I" size="19">
5265              <notnull />
5266              <default value="0" />
5267          </field>
5268          <field name="presence" type="I" size="1">
5269              <notnull />
5270              <default value="1" />
5271          </field>
5272  
5273          <index name="vtiger_date_format_status_idx">
5274              <col>source</col>
5275              <unique />
5276          </index>
5277          <opt platform="mysql">Engine=InnoDB</opt>
5278      </table>
5279  
5280      <table name="vtiger_postatushistory">
5281          <field name="historyid" type="I" size="19">
5282              <key />
5283              <autoincrement />
5284          </field>
5285          <field name="purchaseorderid" type="I" size="19">
5286              <notnull />
5287          </field>
5288          <field name="vendorname" type="C" size="100" />
5289          <field name="total" type="N" />
5290          <field name="postatus" type="C" size="200" />
5291          <field name="lastmodified" type="T" />
5292  
5293          <index name="postatushistory_purchaseorderid_idx">
5294              <col>purchaseorderid</col>
5295          </index>
5296          <opt platform="mysql">Engine=InnoDB</opt>
5297      </table>
5298  
5299      <table name="vtiger_postatushistory" alter="true">
5300          <constraint>ADD CONSTRAINT fk_1_vtiger_postatushistory FOREIGN KEY (purchaseorderid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
5301          <opt>Engine=InnoDB</opt>
5302          <data>
5303          </data>
5304      </table>
5305  
5306      <table name="vtiger_sostatushistory">
5307          <field name="historyid" type="I" size="19">
5308              <key />
5309              <autoincrement />
5310          </field>
5311          <field name="salesorderid" type="I" size="19">
5312              <notnull />
5313          </field>
5314          <field name="accountname" type="C" size="100" />
5315          <field name="total" type="N" />
5316          <field name="sostatus" type="C" size="200" />
5317          <field name="lastmodified" type="T" />
5318  
5319          <index name="sostatushistory_salesorderid_idx">
5320              <col>salesorderid</col>
5321          </index>
5322          <opt platform="mysql">Engine=InnoDB</opt>
5323      </table>
5324  
5325      <table name="vtiger_sostatushistory" alter="true">
5326          <constraint>ADD CONSTRAINT fk_1_vtiger_sostatushistory FOREIGN KEY (salesorderid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
5327          <opt>Engine=InnoDB</opt>
5328          <data>
5329          </data>
5330      </table>
5331  
5332      <table name="vtiger_quotestagehistory">
5333          <field name="historyid" type="I" size="19">
5334              <key />
5335              <autoincrement />
5336          </field>
5337          <field name="quoteid" type="I" size="19">
5338              <notnull />
5339          </field>
5340          <field name="accountname" type="C" size="100" />
5341          <field name="total" type="N" />
5342          <field name="quotestage" type="C" size="200" />
5343          <field name="lastmodified" type="T" />
5344  
5345          <index name="quotestagehistory_quoteid_idx">
5346              <col>quoteid</col>
5347          </index>
5348          <opt platform="mysql">Engine=InnoDB</opt>
5349      </table>
5350  
5351      <table name="vtiger_quotestagehistory" alter="true">
5352          <constraint>ADD CONSTRAINT fk_1_vtiger_quotestagehistory FOREIGN KEY (quoteid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
5353          <opt>Engine=InnoDB</opt>
5354          <data>
5355          </data>
5356      </table>
5357  
5358      <table name="vtiger_invoicestatushistory">
5359          <field name="historyid" type="I" size="19">
5360              <key />
5361              <autoincrement />
5362          </field>
5363          <field name="invoiceid" type="I" size="19">
5364              <notnull />
5365          </field>
5366          <field name="accountname" type="C" size="100" />
5367          <field name="total" type="N" />
5368          <field name="invoicestatus" type="C" size="200" />
5369          <field name="lastmodified" type="T" />
5370  
5371          <index name="invoicestatushistory_invoiceid_idx">
5372              <col>invoiceid</col>
5373          </index>
5374          <opt platform="mysql">Engine=InnoDB</opt>
5375      </table>
5376  
5377      <table name="vtiger_invoicestatushistory" alter="true">
5378          <constraint>ADD CONSTRAINT fk_1_vtiger_invoicestatushistory FOREIGN KEY (invoiceid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
5379          <opt>Engine=InnoDB</opt>
5380          <data>
5381          </data>
5382      </table>
5383  
5384      <table name="vtiger_audit_trial">
5385          <field name="auditid" type="I" size="19">
5386              <key />
5387          </field>
5388          <field name="userid" type="I" size="19" />
5389          <field name="module" type="C" size="255" />
5390          <field name="action" type="C" size="255" />
5391          <field name="recordid" type="C" size="20" />
5392          <field name="actiondate" type="T"/>
5393          <opt platform="mysql">Engine=InnoDB</opt>
5394      </table>
5395  
5396      <table name="vtiger_inventoryproductrel">
5397          <field name="id" type="I" size="19" />
5398          <field name="productid" type="I" size="19" />
5399          <field name="sequence_no" type="I" size="4" />
5400          <field name="quantity" type="N" size="25.3" />
5401          <field name="listprice" type="N" size="25.3" />
5402          <field name="discount_percent" type="N" size="7.3" />
5403          <field name="discount_amount" type="N" size="25.3" />
5404          <field name="comment" type="C" size="250" />
5405          <field name="description" type="X" />
5406          <field name="incrementondel" type="I" size="11">
5407              <notnull />
5408              <default value="0" />
5409          </field>
5410          <field name="lineitem_id" type="I" size="11">
5411              <key />
5412              <autoincrement />
5413          </field>
5414  
5415          <index name="inventoryproductrel_id_idx">
5416              <col>id</col>
5417          </index>
5418          <index name="inventoryproductrel_productid_idx">
5419              <col>productid</col>
5420          </index>
5421          <opt platform="mysql">Engine=InnoDB</opt>
5422      </table>
5423  
5424      <table name="vtiger_shippingtaxinfo">
5425          <field name="taxid" type="I" size="3">
5426              <KEY/>
5427              <notnull />
5428          </field>
5429          <field name="taxname" type="C" size="50">
5430          </field>
5431          <field name="taxlabel" type="C" size="50">
5432          </field>
5433          <field name="percentage" type="N" size="7.3">
5434          </field>
5435          <field name="deleted" type="I" size="1" />
5436  
5437          <index name="shippingtaxinfo_taxname_idx">
5438              <col>taxname</col>
5439          </index>
5440  
5441          <opt platform="mysql">Engine=InnoDB</opt>
5442      </table>
5443  
5444      <table name="vtiger_inventoryshippingrel">
5445          <field name="id" type="I" size="19" />
5446  
5447          <index name="inventoryishippingrel_id_idx">
5448              <col>id</col>
5449          </index>
5450          <opt platform="mysql">Engine=InnoDB</opt>
5451      </table>
5452  
5453      <table name="vtiger_salesmanattachmentsrel">
5454          <field name="smid" type="I" size="19">
5455              <key />
5456              <default value="0" />
5457          </field>
5458          <field name="attachmentsid" type="I" size="19">
5459              <key />
5460              <default value="0" />
5461          </field>
5462  
5463          <index name="salesmanattachmentsrel_smid_idx">
5464              <col>smid</col>
5465          </index>
5466          <index name="salesmanattachmentsrel_attachmentsid_idx">
5467              <col>attachmentsid</col>
5468          </index>
5469          <opt platform="mysql">Engine=InnoDB</opt>
5470      </table>
5471  
5472      <table name="vtiger_salesmanattachmentsrel" alter="true">
5473          <constraint>ADD CONSTRAINT fk_1_vtiger_salesmanattachmentsrel FOREIGN KEY (smid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
5474          <constraint>ADD CONSTRAINT fk_2_vtiger_salesmanattachmentsrel FOREIGN KEY (attachmentsid) REFERENCES vtiger_attachments(attachmentsid) ON DELETE CASCADE</constraint>
5475          <opt>Engine=InnoDB</opt>
5476          <data>
5477          </data>
5478      </table>
5479      <table name="vtiger_entityname">
5480          <field name="tabid" type="I" size="19">
5481              <key />
5482              <default value="0" />
5483          </field>
5484          <field name="modulename" type="C" size="50">
5485              <notnull />
5486          </field>
5487          <field name="tablename" type="C" size="100">
5488              <notnull />
5489          </field>
5490          <field name="fieldname" type="C" size="150">
5491              <notnull />
5492          </field>
5493          <field name="entityidfield" type="C" size="150">
5494              <notnull />
5495          </field>
5496          <field name="entityidcolumn" type="C" size="150">
5497              <notnull />
5498          </field>
5499          <index name="entityname_tabid_idx">
5500              <col>tabid</col>
5501          </index>
5502          <opt platform="mysql">Engine=InnoDB</opt>
5503      </table>
5504  
5505      <table name="vtiger_entityname" alter="true">
5506          <constraint>ADD CONSTRAINT fk_1_vtiger_entityname FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE</constraint>
5507          <opt>Engine=InnoDB</opt>
5508          <data>
5509          </data>
5510      </table>
5511  
5512      <table name="vtiger_version">
5513          <field name="id" type="I" size="11">
5514              <key />
5515              <autoincrement />
5516          </field>
5517          <field name="old_version" type="C" size="30" />
5518          <field name="current_version" type="C" size="30" />
5519          <opt platform="mysql">Engine=InnoDB</opt>
5520      </table>
5521  
5522      <!-- Database changes after 5.0.4 GA -->
5523  
5524      <table name="vtiger_relatedlists_rb">
5525          <field name="entityid" type="I" size="19" />
5526          <field name="action" type="C" size="50" />
5527          <field name="rel_table" type="C" size="200" />
5528          <field name="rel_column" type="C" size="200" />
5529          <field name="ref_column" type="C" size="200" />
5530          <field name="related_crm_ids" type="X" />
5531          <opt platform="mysql">Engine=InnoDB</opt>
5532      </table>
5533  
5534      <table name="vtiger_activity_reminder_popup">
5535          <field name="reminderid" type="I" size="19" >
5536              <key/>
5537              <autoincrement />
5538          </field>
5539          <field name="semodule" type="C" size="100" >
5540              <notnull />
5541          </field>
5542          <field name="recordid" type="I" size="19" >
5543              <notnull />
5544          </field>
5545          <field name="date_start" type="D" >
5546              <notnull />
5547          </field>
5548          <field name="time_start" type="C" size="100" >
5549              <notnull />
5550          </field>
5551          <field name="status" type="I" size="2" >
5552              <notnull />
5553          </field>
5554          <opt platform="mysql">Engine=InnoDB</opt>
5555      </table>
5556  
5557      <table name="vtiger_reminder_interval">
5558          <field name="reminder_intervalid" type="I" size="19" >
5559              <key/>
5560              <autoincrement />
5561          </field>
5562          <field name="reminder_interval" type="C" size="200" >
5563              <notnull />
5564          </field>
5565          <field name="sortorderid" type="I" size="19" >
5566              <notnull />
5567          </field>
5568          <field name="presence" type="I" size="1" >
5569              <notnull />
5570          </field>
5571          <opt platform="mysql">Engine=InnoDB</opt>
5572      </table>
5573  
5574      <table name="vtiger_user2mergefields">
5575          <field name="userid" type="I" size="11" />
5576          <field name="tabid" type="I" size="19" />
5577          <field name="fieldid" type="I" size="19" />
5578          <field name="visible" type="I" size="2" />
5579          <index name="userid_tabid_idx">
5580              <col>userid</col>
5581              <col>tabid</col>
5582          </index>
5583          <opt platform="mysql">Engine=InnoDB</opt>
5584      </table>
5585  
5586      <table name="vtiger_productcurrencyrel">
5587          <field name="productid" type="I" size="11" >
5588              <notnull />
5589          </field>
5590          <field name="currencyid" type="I" size="11" >
5591              <notnull />
5592          </field>
5593          <field name="converted_price"  type="N" size="25.2" />
5594          <field name="actual_price"  type="N" size="25.2" />
5595          <opt platform="mysql">Engine=InnoDB</opt>
5596      </table>
5597  
5598      <table name="vtiger_attachmentsfolder">
5599          <field name="folderid" type="I" size="19">
5600              <key />
5601              <notnull />
5602              <autoincrement />
5603          </field>
5604          <field name="foldername" type="C" size="200">
5605              <notnull />
5606          </field>
5607          <field name="description" type="C" size="250" />
5608          <field name="createdby" type="I" size="19">
5609              <notnull />
5610          </field>
5611          <field name="sequence" type="I" size="19">
5612              <default value="NULL" />
5613          </field>
5614  
5615          <opt platform="mysql">Engine=InnoDB</opt>
5616      </table>
5617  
5618      <table name="vtiger_homestuff">
5619          <field name="stuffid" type="I" size="19">
5620              <key />
5621              <default value="0" />
5622          </field>
5623          <field name="stuffsequence" type="I" size="19">
5624              <notnull />
5625              <default value="0" />
5626          </field>
5627          <field name="stufftype" type="C" size="100" />
5628          <field name="userid" type="I" size="19">
5629              <notnull />
5630          </field>
5631          <field name="visible" type="I" size="10">
5632              <notnull />
5633              <default value="0" />
5634          </field>
5635          <field name="stufftitle" type="C" size="100" />
5636          <index name="stuff_stuffid_idx">
5637              <col>stuffid</col>
5638          </index>
5639          <opt platform="mysql">Engine=InnoDB</opt>
5640      </table>
5641      <table name="vtiger_homestuff" alter="true">
5642          <constraint>ADD CONSTRAINT fk_1_vtiger_homestuff FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
5643          <opt>Engine=InnoDB</opt>
5644          <data>
5645          </data>
5646      </table>
5647  
5648      <table name="vtiger_homemodule">
5649          <field name="stuffid" type="I" size="19">
5650              <key />
5651          </field>
5652          <field name="modulename" type="C" size="100" />
5653          <field name="maxentries" type="I" size="19" >
5654              <notnull />
5655          </field>
5656          <field name="customviewid" type="I" size="19">
5657              <notnull />
5658          </field>
5659          <field name="setype" type="C" size="30">
5660              <notnull />
5661          </field>
5662          <index name="stuff_stuffid_idx">
5663              <col>stuffid</col>
5664          </index>
5665          <opt platform="mysql">Engine=InnoDB</opt>
5666      </table>
5667  
5668      <table name="vtiger_homemodule" alter="true">
5669          <constraint>ADD CONSTRAINT fk_1_vtiger_homemodule FOREIGN KEY (stuffid) REFERENCES vtiger_homestuff(stuffid) ON DELETE CASCADE</constraint>
5670          <opt>Engine=InnoDB</opt>
5671          <data>
5672          </data>
5673      </table>
5674  
5675      <table name="vtiger_homemoduleflds">
5676          <field name="stuffid" type="I" size="19">
5677          </field>
5678          <field name="fieldname" type="C" size="100" />
5679          <index name="stuff_stuffid_idx">
5680              <col>stuffid</col>
5681          </index>
5682          <opt platform="mysql">Engine=InnoDB</opt>
5683      </table>
5684  
5685      <table name="vtiger_homemoduleflds" alter="true">
5686          <constraint>ADD CONSTRAINT fk_1_vtiger_homemoduleflds FOREIGN KEY (stuffid) REFERENCES vtiger_homemodule(stuffid) ON DELETE CASCADE</constraint>
5687          <opt>Engine=InnoDB</opt>
5688          <data>
5689          </data>
5690      </table>
5691  
5692      <table name="vtiger_homerss">
5693          <field name="stuffid" type="I" size="19">
5694              <key />
5695              <default value="0" />
5696          </field>
5697          <field name="url" type="C" size="100" />
5698          <field name="maxentries" type="I" size="19" >
5699              <notnull />
5700          </field>
5701          <index name="stuff_stuffid_idx">
5702              <col>stuffid</col>
5703          </index>
5704          <opt platform="mysql">Engine=InnoDB</opt>
5705      </table>
5706  
5707      <table name="vtiger_homerss" alter="true">
5708          <constraint>ADD CONSTRAINT fk_1_vtiger_homerss FOREIGN KEY (stuffid) REFERENCES vtiger_homestuff(stuffid) ON DELETE CASCADE</constraint>
5709          <opt>Engine=InnoDB</opt>
5710          <data>
5711          </data>
5712      </table>
5713  
5714      <table name="vtiger_homedashbd">
5715          <field name="stuffid" type="I" size="19">
5716              <key />
5717              <default value="0" />
5718          </field>
5719          <field name="dashbdname" type="C" size="100" />
5720          <field name="dashbdtype" type="C" size="100" />
5721          <index name="stuff_stuffid_idx">
5722              <col>stuffid</col>
5723          </index>
5724          <opt platform="mysql">Engine=InnoDB</opt>
5725      </table>
5726  
5727      <table name="vtiger_homedashbd" alter="true">
5728          <constraint>ADD CONSTRAINT fk_1_vtiger_homedashbd FOREIGN KEY (stuffid) REFERENCES vtiger_homestuff(stuffid) ON DELETE CASCADE</constraint>
5729          <opt>Engine=InnoDB</opt>
5730          <data>
5731          </data>
5732      </table>
5733  
5734      <table name="vtiger_homedefault">
5735          <field name="stuffid" type="I" size="19">
5736              <key />
5737              <default value="0" />
5738          </field>
5739          <field name="hometype" type="C" size="30">
5740              <notnull />
5741          </field>
5742          <field name="maxentries" type="I" size="19">
5743          </field>
5744          <field name="setype" type="C" size="30">
5745          </field>
5746          <index name="stuff_stuffid_idx">
5747              <col>stuffid</col>
5748          </index>
5749          <opt platform="mysql">Engine=InnoDB</opt>
5750      </table>
5751  
5752      <table name="vtiger_homedefault" alter="true">
5753          <constraint>ADD CONSTRAINT fk_1_vtiger_homedefault FOREIGN KEY (stuffid) REFERENCES vtiger_homestuff(stuffid) ON DELETE CASCADE</constraint>
5754          <opt>Engine=InnoDB</opt>
5755          <data>
5756          </data>
5757      </table>
5758      <!-- Webservices -->
5759      <table name="vtiger_ws_fieldtype">
5760          <field name="fieldtypeid" type="I" size="19">
5761              <key />
5762              <autoincrement />
5763          </field>
5764          <field name="uitype" type="C" size="30">
5765              <notnull />
5766          </field>
5767          <field name="fieldtype" type="C" size="200">
5768              <notnull />
5769          </field>
5770          <index name="uitype_idx">
5771              <unique />
5772              <col>uitype</col>
5773          </index>
5774          <opt platform="mysql">Engine=InnoDB</opt>
5775      </table>
5776  
5777      <table name="vtiger_ws_referencetype">
5778          <field name="fieldtypeid" type="I" size="19">
5779              <key />
5780              <notnull />
5781          </field>
5782          <field name="type" type="C" size="25">
5783              <key />
5784              <notnull />
5785          </field>
5786          <opt platform="mysql">Engine=InnoDB</opt>
5787      </table>
5788  
5789      <table name="vtiger_ws_referencetype" alter="true">
5790          <constraint>ADD CONSTRAINT `fk_1_vtiger_referencetype` FOREIGN KEY (`fieldtypeid`) REFERENCES `vtiger_ws_fieldtype` (`fieldtypeid`) ON DELETE CASCADE</constraint>
5791          <opt>Engine=InnoDB</opt>
5792          <data>
5793          </data>
5794      </table>
5795  
5796      <table name="vtiger_ws_userauthtoken">
5797          <field name="userid" type="I" size="19">
5798              <key />
5799          </field>
5800          <field name="token" type="C" size="36">
5801              <notnull />
5802          </field>
5803          <field name="expiretime" type="I" size="19">
5804              <key />
5805              <notnull />
5806          </field>
5807          <index name="userid_idx">
5808              <unique />
5809              <col>userid</col>
5810          </index>
5811          <opt platform="mysql">Engine=InnoDB</opt>
5812      </table>
5813  
5814      <table name="vtiger_ws_entity">
5815          <field name="id" type="I" size="11">
5816              <key />
5817              <notnull />
5818              <autoincrement />
5819          </field>
5820          <field name="name" type="C" size="25">
5821              <notnull />
5822              <unique />
5823          </field>
5824          <field name="handler_path" type="C" size="255">
5825              <notnull />
5826          </field>
5827          <field name="handler_class" type="C" size="64">
5828              <notnull />
5829          </field>
5830          <field name="ismodule" type="I" size="3">
5831              <notnull />
5832          </field>
5833          <opt platform="mysql">Engine=InnoDB</opt>
5834      </table>
5835  
5836      <table name="vtiger_ws_entity_tables">
5837          <field name="webservice_entity_id" type="I" size="11">
5838              <key />
5839              <notnull />
5840          </field>
5841          <field name="table_name" type="C" size="50">
5842              <notnull />
5843              <key />
5844          </field>
5845          <opt platform="mysql">Engine=InnoDB</opt>
5846      </table>
5847  
5848      <table name="vtiger_ws_entity_tables" alter="true">
5849          <constraint>ADD CONSTRAINT `fk_1_vtiger_ws_actor_tables` FOREIGN KEY (`webservice_entity_id`) REFERENCES `vtiger_ws_entity` (`id`) ON DELETE CASCADE</constraint>
5850          <opt>Engine=InnoDB</opt>
5851          <data>
5852          </data>
5853      </table>
5854  
5855      <table name="vtiger_ws_entity_fieldtype">
5856          <field name="fieldtypeid" type="I" size="19">
5857              <key />
5858              <autoincrement />
5859          </field>
5860          <field name="table_name" type="C" size="50">
5861              <notnull />
5862          </field>
5863          <field name="field_name" type="C" size="50">
5864              <notnull />
5865          </field>
5866          <field name="fieldtype" type="C" size="200">
5867              <notnull />
5868          </field>
5869          <index name="vtiger_idx_1_tablename_fieldname">
5870              <unique />
5871              <col>table_name</col>
5872              <col>field_name</col>
5873          </index>
5874          <opt platform="mysql">Engine=InnoDB</opt>
5875      </table>
5876  
5877      <table name="vtiger_ws_entity_referencetype">
5878          <field name="fieldtypeid" type="I" size="19">
5879              <key />
5880              <notnull />
5881          </field>
5882          <field name="type" type="C" size="25">
5883              <key />
5884              <notnull />
5885          </field>
5886          <opt platform="mysql">Engine=InnoDB</opt>
5887      </table>
5888  
5889      <table name="vtiger_ws_entity_referencetype" alter="true">
5890          <constraint>ADD CONSTRAINT `vtiger_fk_1_actors_referencetype` FOREIGN KEY (`fieldtypeid`) REFERENCES `vtiger_ws_entity_fieldtype` (`fieldtypeid`) ON DELETE CASCADE</constraint>
5891          <opt>Engine=InnoDB</opt>
5892          <data>
5893          </data>
5894      </table>
5895  
5896      <table name="vtiger_ws_operation">
5897          <field name="operationid" type="I" size="11">
5898              <key />
5899              <notnull />
5900              <autoincrement />
5901          </field>
5902          <field name="name" type="C" size="128">
5903              <notnull />
5904              <unique />
5905          </field>
5906          <field name="handler_path" type="C" size="255">
5907              <notnull />
5908          </field>
5909          <field name="handler_method" type="C" size="64">
5910              <notnull />
5911          </field>
5912          <field name="type" type="C" size="8">
5913              <notnull />
5914          </field>
5915          <field name="prelogin" type="I" size="3">
5916              <notnull />
5917          </field>
5918          <opt platform="mysql">Engine=InnoDB</opt>
5919      </table>
5920  
5921      <table name="vtiger_ws_operation_parameters">
5922          <field name="operationid" type="I" size="11">
5923              <key />
5924              <notnull />
5925              <autoincrement />
5926          </field>
5927          <field name="name" type="C" size="128">
5928              <key />
5929              <notnull />
5930          </field>
5931          <field name="type" type="C" size="64">
5932              <notnull />
5933          </field>
5934          <field name="sequence" type="I" size="11">
5935              <notnull />
5936          </field>
5937          <opt platform="mysql">Engine=InnoDB</opt>
5938      </table>
5939  
5940      <table name="vtiger_ws_entity_name">
5941          <field name="entity_id" type="I" size="11">
5942              <key />
5943          </field>
5944          <field name="name_fields" type="C" size="50">
5945              <notnull />
5946          </field>
5947          <field name="index_field" type="C" size="50">
5948              <notnull />
5949          </field>
5950          <field name="table_name" type="C" size="50">
5951              <notnull />
5952          </field>
5953          <opt platform="mysql">Engine=InnoDB</opt>
5954      </table>
5955      <!-- END -->
5956  
5957      <table name="vtiger_eventhandlers">
5958          <field name="eventhandler_id" type="I" >
5959              <key />
5960              <autoincrement />
5961          </field>
5962          <field name="event_name" type="C" size="100">
5963              <key />
5964          </field>
5965          <field name="handler_path" type="C" size="400">
5966              <notnull />
5967          </field>
5968          <field name="handler_class" type="C" size="100">
5969              <key />
5970              <notnull />
5971          </field>
5972          <field name="cond" type="X">
5973              <notnull />
5974          </field>
5975          <field name="is_active" type="I" size="1">
5976              <notnull />
5977          </field>
5978          <field name="dependent_on" type="C" size="255">
5979              <default value="[]" />
5980          </field>
5981          <index name="eventhandler_idx">
5982              <unique />
5983              <col>eventhandler_id</col>
5984          </index>
5985          <opt platform="mysql">Engine=InnoDB</opt>
5986      </table>
5987  
5988      <table name="vtiger_eventhandler_module">
5989          <field name="eventhandler_module_id" type="I">
5990              <key />
5991              <autoincrement />
5992          </field>
5993          <field name="module_name" type="C" size="100">
5994          </field>
5995          <field name="handler_class" type="C" size="100">
5996          </field>
5997          <index name="eventhandler_idx">
5998              <unique />
5999              <col>eventhandler_id</col>
6000          </index>
6001          <opt platform="mysql">Engine=InnoDB</opt>
6002      </table>
6003  
6004      <!-- vtmailscanner -->
6005      <table name="vtiger_mailscanner">
6006          <field name="scannerid" type="I">
6007              <key />
6008              <autoincrement />
6009          </field>
6010          <field name="scannername" type="C" size="30"></field>
6011          <field name="server" type="C" size="100"></field>
6012          <field name="protocol" type="C" size="10"></field>
6013          <field name="username" type="C" size="255"></field>
6014          <field name="password" type="C" size="255"></field>
6015          <field name="ssltype" type="C" size="10"></field>
6016          <field name="sslmethod" type="C" size="30"></field>
6017          <field name="connecturl" type="C" size="255"></field>
6018          <field name="searchfor" type="C" size="10"></field>
6019          <field name="markas" type="C" size="10"></field>
6020          <field name="isvalid" type="I" size="1"></field>
6021          <opt platform="mysql">Engine=InnoDB</opt>
6022      </table>
6023  
6024      <table name="vtiger_mailscanner_ids">
6025          <field name="scannerid" type="I"></field>
6026          <field name="messageid" type="X"></field>
6027          <field name="crmid" type="I"></field>
6028          <opt platform="mysql">Engine=InnoDB</opt>
6029      </table>
6030  
6031      <table name="vtiger_mailscanner_folders">
6032          <field name="folderid" type="I">
6033              <key />
6034              <autoincrement/>
6035          </field>
6036          <field name="scannerid" type="I"></field>
6037          <field name="foldername" type="C" size="255"></field>
6038          <field name="lastscan" type="C" size="30"></field>
6039          <field name="rescan" type="I" size="1"></field>
6040          <field name="enabled" type="I" size="1"></field>
6041          <opt platform="mysql">Engine=InnoDB</opt>
6042      </table>
6043  
6044      <table name="vtiger_mailscanner_rules">
6045          <field name="ruleid" type="I">
6046              <key />
6047              <autoincrement/>
6048          </field>
6049          <field name="scannerid" type="I"></field>
6050          <field name="fromaddress" type="C" size="255"></field>
6051          <field name="toaddress" type="C" size="255"></field>
6052          <field name="subjectop" type="C" size="20"></field>
6053          <field name="subject" type="C" size="255"></field>
6054          <field name="bodyop" type="C" size="20"></field>
6055          <field name="body" type="C" size="255"></field>
6056          <field name="matchusing" type="C" size="5"></field>
6057          <field name="sequence" type="I"></field>
6058          <opt platform="mysql">Engine=InnoDB</opt>
6059      </table>
6060  
6061      <table name="vtiger_mailscanner_actions">
6062          <field name="actionid" type="I">
6063              <key />
6064              <autoincrement/>
6065          </field>
6066          <field name="scannerid" type="I"></field>
6067          <field name="actiontype" type="C" size="10"></field>
6068          <field name="module" type="C" size="30"></field>
6069          <field name="lookup" type="C" size="30"></field>
6070          <field name="sequence" type="I"></field>
6071          <field name="actiontype" type="C" size="10"></field>
6072          <opt platform="mysql">Engine=InnoDB</opt>
6073      </table>
6074  
6075      <table name="vtiger_mailscanner_ruleactions">
6076          <field name="ruleid" type="I"></field>
6077          <field name="actionid" type="I"></field>
6078          <opt platform="mysql">Engine=InnoDB</opt>
6079      </table>
6080      <!-- END -->
6081  
6082      <!-- Recurring Invoice -->
6083      <table name="vtiger_invoice_recurring_info">
6084          <field name="salesorderid" type="I"></field>
6085          <field name="recurring_frequency" type="C" size="200"></field>
6086          <field name="start_period" type="D"></field>
6087          <field name="end_period" type="D"></field>
6088          <field name="last_recurring_date" type="D">
6089              <default value="NULL" />
6090          </field>
6091          <field name="payment_duration" type="C" size="200"></field>
6092          <field name="invoice_status" type="C" size="200"></field>
6093          <opt platform="mysql">Engine=InnoDB</opt>
6094      </table>
6095  
6096      <table name="vtiger_recurring_frequency">
6097          <field name="recurring_frequency_id" type="I"></field>
6098          <field name="recurring_frequency" type="C" size="200"></field>
6099          <field name="sortorderid" type="I"></field>
6100          <field name="presence" type="I"></field>
6101          <opt platform="mysql">Engine=InnoDB</opt>
6102      </table>
6103  
6104      <table name="vtiger_payment_duration">
6105          <field name="payment_duration_id" type="I"></field>
6106          <field name="payment_duration" type="C" size="200"></field>
6107          <field name="sortorderid" type="I"></field>
6108          <field name="presence" type="I"></field>
6109          <opt platform="mysql">Engine=InnoDB</opt>
6110      </table>
6111      <!-- END -->
6112  
6113      <!-- com_vtiger_workflow -->
6114      <table name="com_vtiger_workflows">
6115          <field name="workflow_id" type="I" >
6116              <key />
6117              <autoincrement />
6118          </field>
6119          <field name="module_name" type="C" size="100">
6120          </field>
6121          <field name="summary" type="C" size="400">
6122              <notnull />
6123          </field>
6124          <field name="test" type="X">
6125              <notnull />
6126          </field>
6127          <field name="execution_condition" type="I">
6128              <notnull />
6129          </field>
6130          <field name="defaultworkflow" type="I" size="1">
6131          </field>
6132          <field name="type" type="C" size="255">
6133          </field>
6134          <field name="filtersavedinnew" type="I" size="1">
6135          </field>
6136                  <field name="schtypeid" type="I" size="10">
6137          </field>
6138                   <field name="schdayofmonth" type="C" size="100">
6139          </field>
6140                   <field name="schdayofweek" type="C" size="100">
6141          </field>
6142                   <field name="schannualdates" type="C" size="100">
6143          </field>
6144                   <field name="schtime" type="C" size="50">
6145          </field>
6146                   <field name="nexttrigger_time" type="T">
6147          </field>
6148          <index name="com_vtiger_workflows_idx">
6149              <unique />
6150              <col>workflow_id</col>
6151          </index>
6152          <opt platform="mysql">Engine=InnoDB</opt>
6153      </table>
6154  
6155      <table name="com_vtiger_workflow_activatedonce">
6156          <field name="workflow_id" type="I" >
6157              <key />
6158          </field>
6159          <field name="entity_id" type="I" >
6160              <key />
6161          </field>
6162          <opt platform="mysql">Engine=InnoDB</opt>
6163      </table>
6164  
6165  
6166      <table name="com_vtiger_workflowtasks">
6167          <field name="task_id" type="I" >
6168              <key />
6169              <autoincrement />
6170          </field>
6171          <field name="workflow_id" type="I" >
6172          </field>
6173          <field name="summary" type="C" size="400">
6174              <notnull />
6175          </field>
6176          <field name="task" type="X">
6177              <notnull />
6178          </field>
6179          <index name="com_vtiger_workflowtasks_idx">
6180              <unique />
6181              <col>task_id</col>
6182          </index>
6183          <opt platform="mysql">Engine=InnoDB</opt>
6184      </table>
6185  
6186      <table name="com_vtiger_workflowtask_queue">
6187          <field name="task_id" type="I" >
6188          </field>
6189          <field name="entity_id" type="C" size="100" >
6190          </field>
6191          <field name="do_after" type="I" >
6192          </field>
6193          <index name="com_vtiger_workflowtask_queue_idx">
6194              <unique />
6195              <col>task_id</col>
6196              <col>entity_id</col>
6197          </index>
6198          <opt platform="mysql">Engine=InnoDB</opt>
6199      </table>
6200  
6201      <table name="com_vtiger_workflowtasks_entitymethod">
6202          <field name="workflowtasks_entitymethod_id" type="I" >
6203              <key />
6204          </field>
6205          <field name="module_name" type="C" size="100" >
6206          </field>
6207          <field name="method_name" type="C" size="100" >
6208          </field>
6209          <field name="function_path" type="C" size="400" >
6210          </field>
6211          <field name="function_name" type="C" size="100" >
6212          </field>
6213          <index name="com_vtiger_workflowtasks_entitymethod_idx">
6214              <unique />
6215              <col>workflowtasks_entitymethod_id</col>
6216          </index>
6217          <opt platform="mysql">Engine=InnoDB</opt>
6218      </table>
6219  
6220      <table name="com_vtiger_workflowtemplates">
6221          <field name="template_id" type="I" >
6222              <key />
6223              <autoincrement />
6224          </field>
6225          <field name="module_name" type="C" size="100" >
6226          </field>
6227          <field name="title" type="C" size="400" >
6228          </field>
6229          <field name="template" type="X">
6230          </field>
6231          <opt platform="mysql">Engine=InnoDB</opt>
6232      </table>
6233  
6234      <table name="com_vtiger_workflow_tasktypes">
6235          <field name="id" type="I" size="11">
6236              <notnull />
6237          </field>
6238          <field name="tasktypename" type="C" size="255" >
6239              <notnull />
6240          </field>
6241          <field name="label" type="C" size="255" >
6242          </field>
6243          <field name="classname" type="C" size="255">
6244          </field>
6245          <field name="classpath" type="C" size="255">
6246          </field>
6247          <field name="templatepath" type="C" size="255">
6248          </field>
6249          <field name="modules" type="C" size="500">
6250          </field>
6251          <field name="sourcemodule" type="C" size="255">
6252          </field>
6253          <opt platform="mysql">Engine=InnoDB</opt>
6254      </table>
6255      <!-- com_vtiger_workflow ends-->
6256  
6257      <!--  asterisk integration starts -->
6258      <table name="vtiger_asteriskextensions">
6259          <field name="userid" type="I" size="11">
6260          </field>
6261          <field name="asterisk_extension" type="C" size="50">
6262          </field>
6263          <field name="use_asterisk" type="C" size="3">
6264          </field>
6265          <opt platform="mysql">Engine=InnoDB</opt>
6266      </table>
6267  
6268      <table name="vtiger_asterisk">
6269          <field name="server" type="C" size="30">
6270          </field>
6271          <field name="port" type="C" size="30">
6272          </field>
6273          <field name="username" type="C" size="50">
6274          </field>
6275          <field name="password" type="C" size="50">
6276          </field>
6277          <field name="version" type="C" size="50">
6278          </field>
6279          <opt platform="mysql">Engine=InnoDB</opt>
6280      </table>
6281  
6282      <table name="vtiger_asteriskincomingcalls">
6283          <field name="from_number" type="C" size="50">
6284          </field>
6285          <field name="from_name" type="C" size="50">
6286          </field>
6287          <field name="to_number" type="C" size="50">
6288          </field>
6289          <field name="callertype" type="C" size="30">
6290          </field>
6291          <field name="flag" type="I" size="19">
6292          </field>
6293          <field name="timer" type="I" size="19">
6294          </field>
6295          <field name="refuid" type="C" size="255">
6296          </field>
6297          <opt platform="mysql">Engine=InnoDB</opt>
6298      </table>
6299  
6300      <table name="vtiger_asteriskincomingevents">
6301          <field name="uid" type="C" size="255">
6302              <key />
6303          </field>
6304          <field name="channel" type="C" size="100">
6305          </field>
6306          <field name="from_number" type="I8" size="20">
6307          </field>
6308          <field name="from_name" type="C" size="100">
6309          </field>
6310          <field name="to_number" type="I8" size="20">
6311          </field>
6312          <field name="callertype" type="C" size="100">
6313          </field>
6314          <field name="timer" type="I" size="20">
6315          </field>
6316          <field name="flag" type="C" size="3">
6317          </field>
6318          <field name="pbxrecordid" type="I" size="19">
6319          </field>
6320          <field name="relcrmid" type="I" size="19">
6321          </field>
6322      </table>
6323      <!--  asterisk integration ends -->
6324  
6325      <table name="vtiger_modentity_num">
6326          <field name="num_id" type="I" size="19">
6327              <key />
6328              <notnull />
6329          </field>
6330          <field name="semodule" type="C" size="50">
6331              <notnull />
6332          </field>
6333          <field name="prefix" type="C" size="50">
6334              <notnull />
6335              <default value="" />
6336          </field>
6337          <field name="start_id" type="C" size="50">
6338              <notnull />
6339          </field>
6340          <field name="cur_id" type="C" size="50">
6341              <notnull />
6342          </field>
6343          <field name="active" type="C" size="2">
6344              <notnull />
6345          </field>
6346          <index name="num_idx" type="C" size="50">
6347              <unique />
6348              <col>num_id</col>
6349          </index>
6350          <index name="semodule_active_idx">
6351              <col>semodule</col>
6352              <col>active</col>
6353          </index>
6354          <opt platform="mysql">Engine=InnoDB</opt>
6355      </table>
6356  
6357      <!-- Table added to store languages -->
6358      <table name="vtiger_language">
6359          <field name="id" type="I">
6360              <key />
6361              <autoincrement />
6362              <notnull />
6363          </field>
6364          <field name="name" type="C" size="50">
6365          </field>
6366          <field name="prefix" type="C" size="10">
6367          </field>
6368          <field name="label" type="C" size="30">
6369          </field>
6370          <field name="lastupdated" type="T">
6371          </field>
6372          <field name="sequence" type="I">
6373          </field>
6374          <field name="isdefault" type="I" size="1">
6375          </field>
6376          <field name="active" type="I" size="1">
6377          </field>
6378          <opt platform="mysql">Engine=InnoDB</opt>
6379      </table>
6380  
6381      <table name="vtiger_crmentityrel">
6382          <field name="crmid" type="I">
6383              <notnull />
6384          </field>
6385          <field name="module" type="C" size="100">
6386              <notnull />
6387          </field>
6388          <field name="relcrmid" type="I">
6389              <notnull />
6390          </field>
6391          <field name="relmodule" type="C" size="100">
6392              <notnull />
6393          </field>
6394          <opt platform="mysql">Engine=InnoDB</opt>
6395      </table>
6396  
6397      <table name="vtiger_fieldmodulerel">
6398          <field name="fieldid" type="I">
6399              <notnull />
6400          </field>
6401          <field name="module" type="C" size="100">
6402              <notnull />
6403          </field>
6404          <field name="relmodule" type="C" size="100">
6405              <notnull />
6406          </field>
6407          <field name="status" type="C" size="10">
6408              <default value="NULL" />
6409          </field>
6410          <field name="sequence" type="I">
6411              <default value="NULL" />
6412          </field>
6413          <opt platform="mysql">Engine=InnoDB</opt>
6414      </table>
6415  
6416      <table name="vtiger_links">
6417          <field name="linkid" type="I">
6418              <notnull />
6419              <key />
6420          </field>
6421          <field name="tabid" type="I" />
6422          <field name="linktype" type="C" size="50" />
6423          <field name="linklabel" type="C" size="50" />
6424          <field name="linkurl" type="C" size="255" />
6425          <field name="linkicon" type="C" size="100" />
6426          <field name="sequence" type="I" />
6427          <field name="handler_path" type="C" size="128">
6428              <default value="NULL" />
6429          </field>
6430          <field name="handler_class" type="C" size="50">
6431              <default value="NULL" />
6432          </field>
6433          <field name="handler" type="C" size="50">
6434              <default value="NULL" />
6435          </field>
6436          <opt platform="mysql">Engine=InnoDB</opt>
6437          <index name="link_tabidtype_idx">
6438              <col>tabid</col>
6439              <col>linktype</col>
6440          </index>
6441      </table>
6442  
6443      <!-- move settings page to database starts -->
6444      <table name="vtiger_settings_blocks">
6445          <field name="blockid" type="I" size="19">
6446              <key />
6447              <notnull />
6448          </field>
6449          <field name="label" type="C" size="250">
6450          </field>
6451          <field name="sequence" type="I" size="19">
6452          </field>
6453          <opt platform="mysql">Engine=InnoDB</opt>
6454      </table>
6455  
6456      <table name="vtiger_settings_field">
6457          <field name="fieldid" type="I" size="19">
6458              <key />
6459              <notnull />
6460          </field>
6461          <field name="blockid" type="I" size="19">
6462          </field>
6463          <field name="name" type="C" size="250">
6464          </field>
6465          <field name="iconpath" type="C" size="300">
6466          </field>
6467          <field name="description" type="X">
6468          </field>
6469          <field name="linkto" type="X">
6470          </field>
6471          <field name="sequence" type="I" size="19">
6472          </field>
6473          <field name="active" type="I" size="19">
6474              <default value="0"/>
6475          </field>
6476          <opt platform="mysql">Engine=InnoDB</opt>
6477      </table>
6478  
6479      <table name="vtiger_settings_field" alter="true">
6480          <constraint>ADD CONSTRAINT fk_1_vtiger_settings_field FOREIGN KEY (blockid) REFERENCES vtiger_settings_blocks(blockid) ON DELETE CASCADE</constraint>
6481          <opt>Engine=InnoDB</opt>
6482          <data>
6483          </data>
6484      </table>
6485      <!-- move settings page to database ends -->
6486  
6487      <!-- Added for Email Status Tracking -->
6488      <table name="vtiger_email_access">
6489          <field name="crmid" type="I" />
6490          <field name="mailid" type="I" />
6491          <field name="accessdate" type="D" />
6492          <field name="accesstime" type="T" />
6493          <opt platform="mysql">Engine=InnoDB</opt>
6494      </table>
6495  
6496      <table name="vtiger_email_track">
6497          <field name="crmid" type="I" />
6498          <field name="mailid" type="I" />
6499          <field name="access_count" type="I" />
6500          <opt platform="mysql">Engine=InnoDB</opt>
6501          <index name="link_tabidtype_idx">
6502              <col>crmid</col>
6503              <col>mailid</col>
6504              <unique />
6505          </index>
6506      </table>
6507  
6508      <table name="vtiger_reportsharing">
6509          <field name="reportid" type="I" size="19">
6510              <notnull />
6511          </field>
6512          <field name="shareid" type="I" size="19">
6513              <notnull />
6514          </field>
6515          <field name="setype" type="C" size="200">
6516              <notnull />
6517          </field>
6518          <opt platform="mysql">Engine=InnoDB</opt>
6519      </table>
6520  
6521      <table name="vtiger_reportfilters">
6522          <field name="filterid" type="I" size="19">
6523              <notnull />
6524          </field>
6525          <field name="name" type="C" size="200">
6526              <notnull />
6527          </field>
6528          <opt platform="mysql">Engine=InnoDB</opt>
6529      </table>
6530  
6531      <!-- notebook changes start -->
6532      <table name="vtiger_notebook_contents">
6533          <field name="userid" type="I" size="19">
6534              <notnull />
6535          </field>
6536          <field name="notebookid" type="I" size="19">
6537              <notnull />
6538          </field>
6539          <field name="contents" type="X">
6540          </field>
6541          <opt platform="mysql">Engine=InnoDB</opt>
6542      </table>
6543      <!-- notebook changes end -->
6544  
6545      <table name="vtiger_inventorysubproductrel">
6546          <field name="id" type="I" size="19">
6547              <notnull />
6548          </field>
6549          <field name="sequence_no" type="I" size="10">
6550              <notnull />
6551          </field>
6552          <field name="productid" type="I" size="19">
6553              <notnull />
6554          </field>
6555          <opt platform="mysql">Engine=InnoDB</opt>
6556      </table>
6557  
6558      <table name="vtiger_activitycf">
6559          <field name="activityid" type="I" size="19">
6560              <key />
6561              <default value="0" />
6562          </field>
6563  
6564          <opt platform="mysql">Engine=InnoDB</opt>
6565      </table>
6566  
6567      <table name="vtiger_user_module_preferences">
6568          <field name="userid" type="I" size="19">
6569              <key />
6570          </field>
6571          <field name="tabid" type="I" size="19">
6572              <key />
6573          </field>
6574          <field name="default_cvid" type="I" size="19">
6575              <notnull />
6576          </field>
6577          <opt platform="mysql">Engine=InnoDB</opt>
6578      </table>
6579  
6580      <table name="vtiger_user_module_preferences" alter="true">
6581          <constraint>ADD CONSTRAINT fk_1_vtiger_user_module_preferences FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
6582          <constraint>ADD CONSTRAINT fk_2_vtiger_user_module_preferences FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
6583          <opt>Engine=InnoDB</opt>
6584          <data>
6585          </data>
6586      </table>
6587      <!-- home page changes start -->
6588      <table name="vtiger_home_layout">
6589          <field name="userid" type="I" size="19">
6590              <key />
6591          </field>
6592          <field name="layout" type="I" size="19">
6593              <notnull />
6594              <default value="4" />
6595          </field>
6596  
6597          <opt platform="mysql">Engine=InnoDB</opt>
6598      </table>
6599  
6600      <!-- home page changes end -->
6601      <table name="vtiger_notescf">
6602          <field name="notesid" type="I" size="19">
6603              <key />
6604              <default value="0" />
6605          </field>
6606  
6607          <opt platform="mysql">Engine=InnoDB</opt>
6608      </table>
6609  
6610      <table name="vtiger_currencies">
6611          <field name="currencyid" type="I" size="19">
6612              <key />
6613              <autoincrement />
6614          </field>
6615          <field name="currency_name" type="C" size="200" />
6616          <field name="currency_code" type="C" size="50" />
6617          <field name="currency_symbol" type="C" size="11" />
6618  
6619          <opt platform="mysql">Engine=InnoDB</opt>
6620      </table>
6621  
6622      <table name="vtiger_tab_info">
6623          <field name="tabid" type="I" size="19" />
6624          <field name="prefname" type="C" size="256" />
6625          <field name="prefvalue" type="C" size="256" />
6626  
6627          <opt platform="mysql">Engine=InnoDB</opt>
6628      </table>
6629  
6630      <table name="vtiger_tab_info" alter="true">
6631          <constraint>ADD CONSTRAINT fk_1_vtiger_tab_info FOREIGN KEY (tabid) REFERENCES vtiger_tab(tabid) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
6632          <opt>Engine=InnoDB</opt>
6633      </table>
6634  
6635      <table name="vtiger_campaignrelstatus">
6636          <field name="campaignrelstatusid" type="I" size="19" />
6637          <field name="campaignrelstatus" type="C" size="256" />
6638          <field name="sortorderid" type="I" size="19" />
6639          <field name="presence" type="I" size="19" />
6640  
6641          <opt platform="mysql">Engine=InnoDB</opt>
6642      </table>
6643  
6644      <table name="vtiger_campaignaccountrel">
6645          <field name="campaignid" type="I" size="19" />
6646          <field name="accountid" type="I" size="19" />
6647          <field name="campaignrelstatusid" type="I" size="19" />
6648  
6649          <opt platform="mysql">Engine=InnoDB</opt>
6650      </table>
6651  
6652      <table name="vtiger_customerportal_tabs">
6653          <field name="tabid" type="I" size="19">
6654              <notnull />
6655              <key />
6656          </field>
6657          <field name="visible" type="I" size="1">
6658              <default value="1" />
6659          </field>
6660          <field name="sequence" type="I" size="1">
6661              <default value="NULL" />
6662          </field>
6663          <opt platform="mysql">Engine=InnoDB</opt>
6664      </table>
6665  
6666      <table name="vtiger_customerportal_prefs">
6667          <field name="tabid" type="I" size="19">
6668              <notnull />
6669              <key />
6670          </field>
6671          <field name="prefkey" type="C" size="100">
6672              <notnull />
6673              <key />
6674          </field>
6675          <field name="prefvalue" type="I" size="20">
6676              <default value="NULL" />
6677          </field>
6678          <opt platform="mysql">Engine=InnoDB</opt>
6679      </table>
6680  
6681      <table name="vtiger_relcriteria_grouping">
6682          <field name="groupid" type="I" size="11">
6683              <key />
6684              <notnull />
6685          </field>
6686          <field name="queryid" type="I" size="19">
6687              <key />
6688          </field>
6689          <field name="group_condition" type="C" size="256">
6690          </field>
6691          <field name="condition_expression" type="X">
6692          </field>
6693          <opt platform="mysql">Engine=InnoDB</opt>
6694      </table>
6695  
6696      <table name="vtiger_scheduled_reports">
6697          <field name="reportid" type="I">
6698              <key />
6699          </field>
6700          <field name="recipients" type="X">
6701          </field>
6702          <field name="schedule" type="X">
6703          </field>
6704          <field name="format" type="C" size="10">
6705          </field>
6706          <field name="next_trigger_time" type="TS">
6707              <DEFTIMESTAMP/>
6708          </field>
6709          <opt platform="mysql">Engine=InnoDB</opt>
6710      </table>
6711  
6712      <table name="vtiger_ws_fieldinfo">
6713          <field name="id" type="C" size="64">
6714              <notnull />
6715              <key />
6716          </field>
6717          <field name="property_name" type="C" size="32">
6718          </field>
6719          <field name="property_value" type="C" size="64">
6720          </field>
6721          <opt platform="mysql">Engine=InnoDB</opt>
6722      </table>
6723  
6724      <table name="vtiger_cvadvfilter_grouping">
6725          <field name="groupid" type="I" size="11">
6726              <key />
6727              <notnull />
6728          </field>
6729          <field name="cvid" type="I" size="19">
6730              <key />
6731          </field>
6732          <field name="group_condition" type="C" size="255">
6733          </field>
6734          <field name="condition_expression" type="X">
6735          </field>
6736          <opt platform="mysql">Engine=InnoDB</opt>
6737      </table>
6738  
6739      <table name="vtiger_picklist_dependency">
6740          <field name="id" type="I" size="11">
6741              <key />
6742          </field>
6743          <field name="tabid" type="I" size="19">
6744              <notnull />
6745          </field>
6746          <field name="sourcefield" type="C" size="255">
6747          </field>
6748          <field name="targetfield" type="C" size="255">
6749          </field>
6750          <field name="sourcevalue" type="C" size="100">
6751          </field>
6752          <field name="targetvalues" type="X">
6753          </field>
6754          <field name="criteria" type="X">
6755          </field>
6756          <opt platform="mysql">Engine=InnoDB</opt>
6757      </table>
6758  
6759      <table name="vtiger_currency_grouping_pattern">
6760          <field name="currency_grouping_patternid" type="I" size="19">
6761              <key />
6762              <autoincrement />
6763          </field>
6764          <field name="currency_grouping_pattern" type="C" size="200">
6765              <notnull />
6766          </field>
6767          <field name="sortorderid" type="I" size="19">
6768              <notnull />
6769              <default value="0" />
6770          </field>
6771          <field name="presence" type="I" size="1">
6772              <notnull />
6773              <default value="1" />
6774          </field>
6775          <opt platform="mysql">Engine=InnoDB</opt>
6776      </table>
6777  
6778      <table name="vtiger_currency_decimal_separator">
6779          <field name="currency_decimal_separatorid" type="I" size="19">
6780              <key />
6781              <autoincrement />
6782          </field>
6783          <field name="currency_decimal_separator" type="C" size="2">
6784              <notnull />
6785          </field>
6786          <field name="sortorderid" type="I" size="19">
6787              <notnull />
6788              <default value="0" />
6789          </field>
6790          <field name="presence" type="I" size="1">
6791              <notnull />
6792              <default value="1" />
6793          </field>
6794          <opt platform="mysql">Engine=InnoDB</opt>
6795      </table>
6796  
6797      <table name="vtiger_currency_grouping_separator">
6798          <field name="currency_grouping_separatorid" type="I" size="19">
6799              <key />
6800              <autoincrement />
6801          </field>
6802          <field name="currency_grouping_separator" type="C" size="2">
6803              <notnull />
6804          </field>
6805          <field name="sortorderid" type="I" size="19">
6806              <notnull />
6807              <default value="0" />
6808          </field>
6809          <field name="presence" type="I" size="1">
6810              <notnull />
6811              <default value="1" />
6812          </field>
6813          <opt platform="mysql">Engine=InnoDB</opt>
6814      </table>
6815  
6816      <table name="vtiger_currency_symbol_placement">
6817          <field name="currency_symbol_placementid" type="I" size="19">
6818              <key />
6819              <autoincrement />
6820          </field>
6821          <field name="currency_symbol_placement" type="C" size="30">
6822              <notnull />
6823          </field>
6824          <field name="sortorderid" type="I" size="19">
6825              <notnull />
6826              <default value="0" />
6827          </field>
6828          <field name="presence" type="I" size="1">
6829              <notnull />
6830              <default value="1" />
6831          </field>
6832          <opt platform="mysql">Engine=InnoDB</opt>
6833      </table>
6834  
6835      <table name="vtiger_time_zone">
6836          <field name="time_zoneid" type="I" size="19">
6837              <key />
6838              <autoincrement />
6839          </field>
6840          <field name="time_zone" type="C" size="200">
6841              <notnull />
6842          </field>
6843          <field name="sortorderid" type="I" size="19">
6844              <notnull />
6845              <default value="0" />
6846          </field>
6847          <field name="presence" type="I" size="1">
6848              <notnull />
6849              <default value="1" />
6850          </field>
6851          <opt platform="mysql">Engine=InnoDB</opt>
6852      </table>
6853  
6854      <table name="vtiger_homereportchart">
6855          <field name="stuffid" type="I" size="11">
6856              <key />
6857          </field>
6858          <field name="reportid" type="I" size="19" />
6859          <field name="reportcharttype" type="C" size="100" />
6860          <opt platform="mysql">Engine=InnoDB</opt>
6861      </table>
6862  
6863      <table name="vtiger_reportgroupbycolumn">
6864          <field name="reportid" type="I" size="19" />
6865          <field name="sortid" type="I" size="19" />
6866          <field name="sortcolname" type="C" size="250" />
6867          <field name="dategroupbycriteria" type="C" size="250" />
6868          <opt platform="mysql">Engine=InnoDB</opt>
6869      </table>
6870  
6871      <table name="vtiger_reportgroupbycolumn" alter="true">
6872          <constraint>ADD CONSTRAINT fk_1_vtiger_reportgroupbycolumn FOREIGN KEY (reportid) REFERENCES vtiger_report(reportid) ON DELETE CASCADE</constraint>
6873          <opt>Engine=InnoDB</opt>
6874      </table>
6875  
6876      <table name="vtiger_crmsetup">
6877          <field name="userid" type="I" size="11" />
6878          <field name="setup_status" type="I" size="2" />
6879          <opt platform="mysql">Engine=InnoDB</opt>
6880      </table>
6881          
6882          <table name="vtiger_feedback">
6883          <field name="userid" type="I" size="19">
6884          </field>
6885          <field name="dontshow" type="C" size="19" >
6886                      <default value="false" />
6887                  </field>
6888  
6889          <opt platform="mysql">Engine=InnoDB</opt>
6890      </table>
6891          
6892          <table name="vtiger_shareduserinfo">
6893          <field name="userid" type="I" size="19">
6894                      <notnull />
6895                      <default value="0" />
6896          </field>
6897          <field name="shareduserid" type="I" size="19">
6898                      <notnull />
6899                      <default value="0" />
6900          </field>
6901                  <field name="color" type="C" size="50" />
6902                  <field name="visible" type="I" size="19" >
6903                      <default value="1" />
6904                  </field>
6905  
6906          <opt platform="mysql">Engine=InnoDB</opt>
6907      </table>
6908          
6909          <table name="vtiger_calendar_default_activitytypes">
6910          <field name="id" type="I" size="19">
6911              <key />
6912          </field>
6913          <field name="module" type="C" size="50" />
6914                  <field name="fieldname" type="C" size="50" />
6915                  <field name="defaultcolor" type="C" size="50" />
6916  
6917          <opt platform="mysql">Engine=InnoDB</opt>
6918      </table>
6919          
6920          <table name="vtiger_calendar_user_activitytypes">
6921          <field name="id" type="I" size="19">
6922              <key />
6923          </field>
6924          <field name="defaultid" type="I" size="19" />
6925                  <field name="userid" type="I" size="19" />
6926                  <field name="color" type="C" size="50" />
6927                  <field name="visible" type="I" size="19" >
6928                      <default value="1" />
6929                  </field>
6930  
6931          <opt platform="mysql">Engine=InnoDB</opt>
6932      </table>
6933  
6934  </schema>


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1