home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / lib / sql / groupoffice.sql < prev    next >
Text File  |  2004-03-08  |  29KB  |  973 lines

  1. # phpMyAdmin SQL Dump
  2. # version 2.5.5-pl1
  3. # http://www.phpmyadmin.net
  4. #
  5. # Host: localhost
  6. # Generation Time: Mar 08, 2004 at 12:32 PM
  7. # Server version: 3.23.58
  8. # PHP Version: 4.2.2
  9. # Database : `groupoffice`
  10.  
  11. # --------------------------------------------------------
  12.  
  13. #
  14. # Table structure for table `ab_addressbooks`
  15. #
  16.  
  17. DROP TABLE IF EXISTS `ab_addressbooks`;
  18. CREATE TABLE `ab_addressbooks` (
  19.   `id` int(11) NOT NULL default '0',
  20.   `user_id` int(11) NOT NULL default '0',
  21.   `name` varchar(50) NOT NULL default '',
  22.   `acl_read` int(11) NOT NULL default '0',
  23.   `acl_write` int(11) NOT NULL default '0',
  24.   PRIMARY KEY  (`id`),
  25.   KEY `user_id` (`user_id`)
  26. ) TYPE=MyISAM;
  27.  
  28. # --------------------------------------------------------
  29.  
  30. #
  31. # Table structure for table `ab_companies`
  32. #
  33.  
  34. DROP TABLE IF EXISTS `ab_companies`;
  35. CREATE TABLE `ab_companies` (
  36.   `id` int(11) NOT NULL default '0',
  37.   `addressbook_id` int(11) NOT NULL default '0',
  38.   `name` varchar(50) NOT NULL default '',
  39.   `address` varchar(100) NOT NULL default '',
  40.   `zip` varchar(10) NOT NULL default '',
  41.   `city` varchar(50) NOT NULL default '',
  42.   `state` varchar(50) NOT NULL default '',
  43.   `country` varchar(50) NOT NULL default '',
  44.   `phone` varchar(20) NOT NULL default '',
  45.   `fax` varchar(20) NOT NULL default '',
  46.   `email` varchar(75) NOT NULL default '',
  47.   `homepage` varchar(100) NOT NULL default '',
  48.   `bank_no` varchar(20) NOT NULL default '',
  49.   `vat_no` varchar(30) NOT NULL default '',
  50.   `acl_read` int(11) NOT NULL default '0',
  51.   `acl_write` int(11) NOT NULL default '0'
  52. ) TYPE=MyISAM;
  53.  
  54. # --------------------------------------------------------
  55.  
  56. #
  57. # Table structure for table `ab_contacts`
  58. #
  59.  
  60. DROP TABLE IF EXISTS `ab_contacts`;
  61. CREATE TABLE `ab_contacts` (
  62.   `id` int(11) NOT NULL default '0',
  63.   `addressbook_id` int(11) NOT NULL default '0',
  64.   `source_id` int(11) NOT NULL default '0',
  65.   `group_id` int(11) NOT NULL default '0',
  66.   `first_name` varchar(50) NOT NULL default '',
  67.   `middle_name` varchar(50) NOT NULL default '',
  68.   `last_name` varchar(50) NOT NULL default '',
  69.   `initials` varchar(10) NOT NULL default '',
  70.   `title` varchar(10) NOT NULL default '',
  71.   `sex` enum('M','F') NOT NULL default 'M',
  72.   `birthday` date NOT NULL default '0000-00-00',
  73.   `email` varchar(100) NOT NULL default '',
  74.   `company_id` int(11) NOT NULL default '0',
  75.   `department` varchar(50) NOT NULL default '',
  76.   `function` varchar(50) NOT NULL default '',
  77.   `home_phone` varchar(20) NOT NULL default '',
  78.   `work_phone` varchar(20) NOT NULL default '',
  79.   `fax` varchar(20) NOT NULL default '',
  80.   `work_fax` varchar(20) NOT NULL default '',
  81.   `cellular` varchar(20) NOT NULL default '',
  82.   `country` varchar(50) NOT NULL default '',
  83.   `state` varchar(50) NOT NULL default '',
  84.   `city` varchar(50) NOT NULL default '',
  85.   `zip` varchar(10) NOT NULL default '',
  86.   `address` varchar(100) NOT NULL default '',
  87.   `comment` varchar(50) NOT NULL default '',
  88.   `color` varchar(6) NOT NULL default '',
  89.   `acl_read` int(11) NOT NULL default '0',
  90.   `acl_write` int(11) NOT NULL default '0',
  91.   PRIMARY KEY  (`id`),
  92.   KEY `id` (`id`),
  93.   KEY `user_id` (`addressbook_id`)
  94. ) TYPE=MyISAM;
  95.  
  96. # --------------------------------------------------------
  97.  
  98. #
  99. # Table structure for table `ab_custom_company_fields`
  100. #
  101.  
  102. DROP TABLE IF EXISTS `ab_custom_company_fields`;
  103. CREATE TABLE `ab_custom_company_fields` (
  104.   `id` int(11) NOT NULL default '0',
  105.   `Test` varchar(50) NOT NULL default '',
  106.   PRIMARY KEY  (`id`)
  107. ) TYPE=MyISAM;
  108.  
  109. # --------------------------------------------------------
  110.  
  111. #
  112. # Table structure for table `ab_custom_company_fields_sort`
  113. #
  114.  
  115. DROP TABLE IF EXISTS `ab_custom_company_fields_sort`;
  116. CREATE TABLE `ab_custom_company_fields_sort` (
  117.   `field` varchar(50) NOT NULL default '',
  118.   `size` tinyint(4) NOT NULL default '0',
  119.   `sort_index` tinyint(4) NOT NULL default '0',
  120.   PRIMARY KEY  (`field`)
  121. ) TYPE=MyISAM;
  122.  
  123. # --------------------------------------------------------
  124.  
  125. #
  126. # Table structure for table `ab_custom_contact_fields`
  127. #
  128.  
  129. DROP TABLE IF EXISTS `ab_custom_contact_fields`;
  130. CREATE TABLE `ab_custom_contact_fields` (
  131.   `id` int(11) NOT NULL default '0',
  132.   `Testje contacts` varchar(50) NOT NULL default '',
  133.   PRIMARY KEY  (`id`)
  134. ) TYPE=MyISAM;
  135.  
  136. # --------------------------------------------------------
  137.  
  138. #
  139. # Table structure for table `ab_custom_contact_fields_sort`
  140. #
  141.  
  142. DROP TABLE IF EXISTS `ab_custom_contact_fields_sort`;
  143. CREATE TABLE `ab_custom_contact_fields_sort` (
  144.   `field` varchar(50) NOT NULL default '',
  145.   `size` tinyint(4) NOT NULL default '0',
  146.   `sort_index` tinyint(4) NOT NULL default '0',
  147.   PRIMARY KEY  (`field`),
  148.   KEY `sort_index` (`sort_index`)
  149. ) TYPE=MyISAM;
  150.  
  151. # --------------------------------------------------------
  152.  
  153. #
  154. # Table structure for table `ab_groups`
  155. #
  156.  
  157. DROP TABLE IF EXISTS `ab_groups`;
  158. CREATE TABLE `ab_groups` (
  159.   `id` int(11) NOT NULL default '0',
  160.   `addressbook_id` int(11) NOT NULL default '0',
  161.   `name` varchar(50) NOT NULL default '',
  162.   PRIMARY KEY  (`id`),
  163.   KEY `id` (`id`),
  164.   KEY `user_id` (`addressbook_id`)
  165. ) TYPE=MyISAM;
  166.  
  167. # --------------------------------------------------------
  168.  
  169. #
  170. # Table structure for table `ab_subscribed`
  171. #
  172.  
  173. DROP TABLE IF EXISTS `ab_subscribed`;
  174. CREATE TABLE `ab_subscribed` (
  175.   `user_id` int(11) NOT NULL default '0',
  176.   `addressbook_id` int(11) NOT NULL default '0',
  177.   `standard` enum('0','1') NOT NULL default '0',
  178.   KEY `user_id` (`user_id`,`addressbook_id`,`standard`),
  179.   KEY `addressbook_id` (`addressbook_id`)
  180. ) TYPE=MyISAM;
  181.  
  182. # --------------------------------------------------------
  183.  
  184. #
  185. # Table structure for table `acl`
  186. #
  187.  
  188. DROP TABLE IF EXISTS `acl`;
  189. CREATE TABLE `acl` (
  190.   `acl_id` int(11) NOT NULL default '0',
  191.   `user_id` int(11) NOT NULL default '0',
  192.   `group_id` int(11) NOT NULL default '0',
  193.   KEY `acl_id` (`acl_id`),
  194.   KEY `user_id` (`user_id`),
  195.   KEY `group_id` (`group_id`)
  196. ) TYPE=MyISAM;
  197.  
  198. # --------------------------------------------------------
  199.  
  200. #
  201. # Table structure for table `acl_items`
  202. #
  203.  
  204. DROP TABLE IF EXISTS `acl_items`;
  205. CREATE TABLE `acl_items` (
  206.   `id` int(11) NOT NULL default '0',
  207.   `user_id` int(11) NOT NULL default '0',
  208.   `description` varchar(50) NOT NULL default '',
  209.   PRIMARY KEY  (`id`),
  210.   KEY `id` (`id`)
  211. ) TYPE=MyISAM;
  212.  
  213. # --------------------------------------------------------
  214.  
  215. #
  216. # Table structure for table `bookmarks`
  217. #
  218.  
  219. DROP TABLE IF EXISTS `bookmarks`;
  220. CREATE TABLE `bookmarks` (
  221.   `id` int(11) NOT NULL default '0',
  222.   `user_id` int(11) NOT NULL default '0',
  223.   `URL` varchar(200) NOT NULL default '',
  224.   `name` varchar(50) NOT NULL default '',
  225.   `new_window` tinyint(4) NOT NULL default '0',
  226.   PRIMARY KEY  (`id`),
  227.   KEY `id` (`id`)
  228. ) TYPE=MyISAM;
  229.  
  230. # --------------------------------------------------------
  231.  
  232. #
  233. # Table structure for table `cal_calendars`
  234. #
  235.  
  236. DROP TABLE IF EXISTS `cal_calendars`;
  237. CREATE TABLE `cal_calendars` (
  238.   `id` int(11) NOT NULL default '0',
  239.   `user_id` int(11) NOT NULL default '0',
  240.   `acl_read` int(11) NOT NULL default '0',
  241.   `acl_write` int(11) NOT NULL default '0',
  242.   `name` varchar(100) NOT NULL default '',
  243.   `start_hour` tinyint(4) NOT NULL default '0',
  244.   `end_hour` tinyint(4) NOT NULL default '0',
  245.   PRIMARY KEY  (`id`)
  246. ) TYPE=MyISAM;
  247.  
  248. # --------------------------------------------------------
  249.  
  250. #
  251. # Table structure for table `cal_events`
  252. #
  253.  
  254. DROP TABLE IF EXISTS `cal_events`;
  255. CREATE TABLE `cal_events` (
  256.   `id` int(11) NOT NULL default '0',
  257.   `user_id` int(11) NOT NULL default '0',
  258.   `acl_read` int(11) NOT NULL default '0',
  259.   `acl_write` int(11) NOT NULL default '0',
  260.   `start_time` int(11) NOT NULL default '0',
  261.   `end_time` int(11) NOT NULL default '0',
  262.   `all_day_event` enum('0','1') NOT NULL default '0',
  263.   `contact_id` int(11) NOT NULL default '0',
  264.   `name` varchar(100) NOT NULL default '',
  265.   `description` text NOT NULL,
  266.   `location` varchar(100) NOT NULL default '',
  267.   `background` varchar(7) NOT NULL default '',
  268.   `repeat_type` enum('0','1','2','3','4','5') NOT NULL default '0',
  269.   `repeat_forever` enum('0','1') NOT NULL default '0',
  270.   `repeat_every` tinyint(4) NOT NULL default '0',
  271.   `repeat_end_time` int(11) NOT NULL default '0',
  272.   `mon` enum('0','1') NOT NULL default '0',
  273.   `tue` enum('0','1') NOT NULL default '0',
  274.   `wed` enum('0','1') NOT NULL default '0',
  275.   `thu` enum('0','1') NOT NULL default '0',
  276.   `fri` enum('0','1') NOT NULL default '0',
  277.   `sat` enum('0','1') NOT NULL default '0',
  278.   `sun` enum('0','1') NOT NULL default '0',
  279.   `month_time` enum('0','1','2','3','4','5') NOT NULL default '0',
  280.   `reminder` int(11) NOT NULL default '0',
  281.   PRIMARY KEY  (`id`),
  282.   KEY `start_time` (`start_time`),
  283.   KEY `end_time` (`end_time`),
  284.   KEY `repeat_end_time` (`repeat_end_time`),
  285.   KEY `acl_read` (`acl_read`),
  286.   KEY `acl_write` (`acl_write`)
  287. ) TYPE=MyISAM;
  288.  
  289. # --------------------------------------------------------
  290.  
  291. #
  292. # Table structure for table `cal_events_calendars`
  293. #
  294.  
  295. DROP TABLE IF EXISTS `cal_events_calendars`;
  296. CREATE TABLE `cal_events_calendars` (
  297.   `calendar_id` int(11) NOT NULL default '0',
  298.   `event_id` int(11) NOT NULL default '0',
  299.   KEY `calendar_id` (`calendar_id`,`event_id`)
  300. ) TYPE=MyISAM;
  301.  
  302. # --------------------------------------------------------
  303.  
  304. #
  305. # Table structure for table `cal_holidays`
  306. #
  307.  
  308. DROP TABLE IF EXISTS `cal_holidays`;
  309. CREATE TABLE `cal_holidays` (
  310.   `id` int(11) NOT NULL default '0',
  311.   `user_id` int(11) NOT NULL default '0',
  312.   `calendar_id` int(11) NOT NULL default '0',
  313.   `date` int(10) NOT NULL default '0',
  314.   `name` varchar(100) NOT NULL default '',
  315.   `region` varchar(4) NOT NULL default '',
  316.   PRIMARY KEY  (`id`)
  317. ) TYPE=MyISAM;
  318.  
  319. # --------------------------------------------------------
  320.  
  321. #
  322. # Table structure for table `cal_participants`
  323. #
  324.  
  325. DROP TABLE IF EXISTS `cal_participants`;
  326. CREATE TABLE `cal_participants` (
  327.   `id` int(11) NOT NULL default '0',
  328.   `event_id` int(11) NOT NULL default '0',
  329.   `name` varchar(50) NOT NULL default '',
  330.   `email` varchar(100) NOT NULL default '',
  331.   `user_id` int(11) NOT NULL default '0',
  332.   `status` enum('0','1','2') NOT NULL default '0',
  333.   PRIMARY KEY  (`id`),
  334.   KEY `id` (`id`)
  335. ) TYPE=MyISAM;
  336.  
  337. # --------------------------------------------------------
  338.  
  339. #
  340. # Table structure for table `cal_reminders`
  341. #
  342.  
  343. DROP TABLE IF EXISTS `cal_reminders`;
  344. CREATE TABLE `cal_reminders` (
  345.   `user_id` int(11) NOT NULL default '0',
  346.   `event_id` int(11) NOT NULL default '0',
  347.   `remind_time` int(11) NOT NULL default '0',
  348.   KEY `user_id` (`user_id`),
  349.   KEY `event_id` (`event_id`)
  350. ) TYPE=MyISAM;
  351.  
  352. # --------------------------------------------------------
  353.  
  354. #
  355. # Table structure for table `cal_subscribed`
  356. #
  357.  
  358. DROP TABLE IF EXISTS `cal_subscribed`;
  359. CREATE TABLE `cal_subscribed` (
  360.   `calendar_id` int(11) NOT NULL default '0',
  361.   `user_id` int(11) NOT NULL default '0',
  362.   `standard` enum('0','1') NOT NULL default '0'
  363. ) TYPE=MyISAM;
  364.  
  365. # --------------------------------------------------------
  366.  
  367. #
  368. # Table structure for table `cms_files`
  369. #
  370.  
  371. DROP TABLE IF EXISTS `cms_files`;
  372. CREATE TABLE `cms_files` (
  373.   `id` int(11) NOT NULL default '0',
  374.   `folder_id` int(11) NOT NULL default '0',
  375.   `extension` varchar(10) NOT NULL default '',
  376.   `size` int(11) NOT NULL default '0',
  377.   `mtime` int(11) NOT NULL default '0',
  378.   `name` varchar(50) NOT NULL default '',
  379.   `content` longblob NOT NULL,
  380.   `title` varchar(100) NOT NULL default '',
  381.   `description` text NOT NULL,
  382.   `keywords` text NOT NULL,
  383.   `priority` int(11) NOT NULL default '0',
  384.   PRIMARY KEY  (`id`),
  385.   KEY `id` (`id`)
  386. ) TYPE=MyISAM;
  387.  
  388. # --------------------------------------------------------
  389.  
  390. #
  391. # Table structure for table `cms_folders`
  392. #
  393.  
  394. DROP TABLE IF EXISTS `cms_folders`;
  395. CREATE TABLE `cms_folders` (
  396.   `id` int(11) NOT NULL default '0',
  397.   `parent_id` int(11) NOT NULL default '0',
  398.   `mtime` int(11) NOT NULL default '0',
  399.   `name` char(50) NOT NULL default '',
  400.   `disabled` enum('0','1') NOT NULL default '0',
  401.   `priority` int(11) NOT NULL default '0',
  402.   PRIMARY KEY  (`id`),
  403.   KEY `id` (`id`),
  404.   KEY `parent_id` (`parent_id`)
  405. ) TYPE=MyISAM;
  406.  
  407. # --------------------------------------------------------
  408.  
  409. #
  410. # Table structure for table `cms_search_files`
  411. #
  412.  
  413. DROP TABLE IF EXISTS `cms_search_files`;
  414. CREATE TABLE `cms_search_files` (
  415.   `search_word_id` int(11) NOT NULL default '0',
  416.   `file_id` int(11) NOT NULL default '0',
  417.   KEY `file_id` (`file_id`),
  418.   KEY `search_word_id` (`search_word_id`)
  419. ) TYPE=MyISAM;
  420.  
  421. # --------------------------------------------------------
  422.  
  423. #
  424. # Table structure for table `cms_search_words`
  425. #
  426.  
  427. DROP TABLE IF EXISTS `cms_search_words`;
  428. CREATE TABLE `cms_search_words` (
  429.   `id` int(11) NOT NULL default '0',
  430.   `site_id` int(11) NOT NULL default '0',
  431.   `search_word` varchar(50) NOT NULL default '',
  432.   PRIMARY KEY  (`id`),
  433.   KEY `site_id` (`site_id`)
  434. ) TYPE=MyISAM;
  435.  
  436. # --------------------------------------------------------
  437.  
  438. #
  439. # Table structure for table `cms_sites`
  440. #
  441.  
  442. DROP TABLE IF EXISTS `cms_sites`;
  443. CREATE TABLE `cms_sites` (
  444.   `id` int(11) NOT NULL default '0',
  445.   `user_id` int(11) NOT NULL default '0',
  446.   `root_folder_id` int(11) NOT NULL default '0',
  447.   `acl_write` int(11) NOT NULL default '0',
  448.   `acl_read` int(11) NOT NULL default '0',
  449.   `name` varchar(100) NOT NULL default '',
  450.   `description` text NOT NULL,
  451.   `keywords` text NOT NULL,
  452.   `template_id` int(11) NOT NULL default '0',
  453.   `publish_style` enum('0','1','2') NOT NULL default '0',
  454.   `publish_path` varchar(100) NOT NULL default '',
  455.   PRIMARY KEY  (`id`),
  456.   KEY `id` (`id`)
  457. ) TYPE=MyISAM;
  458.  
  459. # --------------------------------------------------------
  460.  
  461. #
  462. # Table structure for table `cms_subscribed`
  463. #
  464.  
  465. DROP TABLE IF EXISTS `cms_subscribed`;
  466. CREATE TABLE `cms_subscribed` (
  467.   `user_id` int(11) NOT NULL default '0',
  468.   `site_id` int(11) NOT NULL default '0',
  469.   KEY `user_id` (`user_id`),
  470.   KEY `site_id` (`site_id`)
  471. ) TYPE=MyISAM;
  472.  
  473. # --------------------------------------------------------
  474.  
  475. #
  476. # Table structure for table `cms_template_files`
  477. #
  478.  
  479. DROP TABLE IF EXISTS `cms_template_files`;
  480. CREATE TABLE `cms_template_files` (
  481.   `id` int(11) NOT NULL default '0',
  482.   `template_id` int(11) NOT NULL default '0',
  483.   `name` varchar(100) NOT NULL default '',
  484.   `extension` varchar(10) NOT NULL default '',
  485.   `size` int(11) NOT NULL default '0',
  486.   `mtime` int(11) NOT NULL default '0',
  487.   `content` mediumblob NOT NULL,
  488.   PRIMARY KEY  (`id`)
  489. ) TYPE=MyISAM;
  490.  
  491. # --------------------------------------------------------
  492.  
  493. #
  494. # Table structure for table `cms_template_items`
  495. #
  496.  
  497. DROP TABLE IF EXISTS `cms_template_items`;
  498. CREATE TABLE `cms_template_items` (
  499.   `id` int(11) NOT NULL default '0',
  500.   `template_id` int(11) NOT NULL default '0',
  501.   `name` varchar(50) NOT NULL default '',
  502.   `content` text NOT NULL,
  503.   `main` enum('0','1') NOT NULL default '0',
  504.   PRIMARY KEY  (`id`),
  505.   KEY `template_id` (`template_id`)
  506. ) TYPE=MyISAM;
  507.  
  508. # --------------------------------------------------------
  509.  
  510. #
  511. # Table structure for table `cms_templates`
  512. #
  513.  
  514. DROP TABLE IF EXISTS `cms_templates`;
  515. CREATE TABLE `cms_templates` (
  516.   `id` int(11) NOT NULL default '0',
  517.   `user_id` int(11) NOT NULL default '0',
  518.   `root_folder_id` int(11) NOT NULL default '0',
  519.   `name` varchar(50) NOT NULL default '',
  520.   `style` text NOT NULL,
  521.   `additional_style` text NOT NULL,
  522.   `restrict_editor` enum('0','1') NOT NULL default '0',
  523.   `acl_read` int(11) NOT NULL default '0',
  524.   `acl_write` int(11) NOT NULL default '0',
  525.   PRIMARY KEY  (`id`),
  526.   KEY `user_id` (`user_id`)
  527. ) TYPE=MyISAM;
  528.  
  529. # --------------------------------------------------------
  530.  
  531. #
  532. # Table structure for table `db_sequence`
  533. #
  534.  
  535. DROP TABLE IF EXISTS `db_sequence`;
  536. CREATE TABLE `db_sequence` (
  537.   `seq_name` char(20) NOT NULL default '',
  538.   `nextid` int(11) NOT NULL default '0',
  539.   PRIMARY KEY  (`seq_name`),
  540.   KEY `seq_name` (`seq_name`)
  541. ) TYPE=MyISAM;
  542.  
  543. # --------------------------------------------------------
  544.  
  545. #
  546. # Table structure for table `emAccounts`
  547. #
  548.  
  549. DROP TABLE IF EXISTS `emAccounts`;
  550. CREATE TABLE `emAccounts` (
  551.   `id` int(11) NOT NULL default '0',
  552.   `user_id` int(11) NOT NULL default '0',
  553.   `type` varchar(4) NOT NULL default '',
  554.   `host` varchar(100) NOT NULL default '',
  555.   `port` int(11) NOT NULL default '0',
  556.   `username` varchar(50) NOT NULL default '',
  557.   `password` varchar(64) NOT NULL default '',
  558.   `name` varchar(100) NOT NULL default '',
  559.   `email` varchar(100) NOT NULL default '',
  560.   `signature` text NOT NULL,
  561.   `standard` tinyint(4) NOT NULL default '0',
  562.   `mbroot` varchar(30) NOT NULL default '',
  563.   `sent` varchar(100) NOT NULL default '',
  564.   `spam` varchar(100) NOT NULL default '',
  565.   `trash` varchar(100) NOT NULL default '',
  566.   `auto_check` enum('0','1') NOT NULL default '0',
  567.   PRIMARY KEY  (`id`),
  568.   KEY `id` (`id`),
  569.   KEY `user_id` (`user_id`)
  570. ) TYPE=MyISAM;
  571.  
  572. # --------------------------------------------------------
  573.  
  574. #
  575. # Table structure for table `emFilters`
  576. #
  577.  
  578. DROP TABLE IF EXISTS `emFilters`;
  579. CREATE TABLE `emFilters` (
  580.   `id` int(11) NOT NULL default '0',
  581.   `account_id` int(11) NOT NULL default '0',
  582.   `field` varchar(20) NOT NULL default '0',
  583.   `keyword` varchar(100) NOT NULL default '0',
  584.   `folder` varchar(100) NOT NULL default '0',
  585.   `priority` int(11) NOT NULL default '0',
  586.   PRIMARY KEY  (`id`),
  587.   KEY `id` (`id`)
  588. ) TYPE=MyISAM;
  589.  
  590. # --------------------------------------------------------
  591.  
  592. #
  593. # Table structure for table `emFolders`
  594. #
  595.  
  596. DROP TABLE IF EXISTS `emFolders`;
  597. CREATE TABLE `emFolders` (
  598.   `id` int(11) NOT NULL default '0',
  599.   `account_id` int(11) NOT NULL default '0',
  600.   `name` varchar(100) NOT NULL default '',
  601.   `subscribed` enum('0','1') NOT NULL default '0',
  602.   `parent_id` int(11) NOT NULL default '0',
  603.   `delimiter` char(1) NOT NULL default '',
  604.   `attributes` int(11) NOT NULL default '0',
  605.   PRIMARY KEY  (`id`),
  606.   KEY `id` (`id`),
  607.   KEY `account_id` (`account_id`),
  608.   KEY `parent_id` (`parent_id`)
  609. ) TYPE=MyISAM;
  610.  
  611. # --------------------------------------------------------
  612.  
  613. #
  614. # Table structure for table `filetypes`
  615. #
  616.  
  617. DROP TABLE IF EXISTS `filetypes`;
  618. CREATE TABLE `filetypes` (
  619.   `extension` varchar(10) NOT NULL default '',
  620.   `mime` varchar(50) NOT NULL default '',
  621.   `friendly` varchar(50) NOT NULL default '',
  622.   `image` blob NOT NULL,
  623.   PRIMARY KEY  (`extension`),
  624.   KEY `extension` (`extension`)
  625. ) TYPE=MyISAM COMMENT='filetypes';
  626.  
  627. # --------------------------------------------------------
  628.  
  629. #
  630. # Table structure for table `fsShares`
  631. #
  632.  
  633. DROP TABLE IF EXISTS `fsShares`;
  634. CREATE TABLE `fsShares` (
  635.   `user_id` int(11) NOT NULL default '0',
  636.   `path` varchar(200) NOT NULL default '',
  637.   `acl_read` int(11) NOT NULL default '0',
  638.   `acl_write` int(11) NOT NULL default '0',
  639.   PRIMARY KEY  (`path`),
  640.   KEY `path` (`path`),
  641.   KEY `user_id` (`user_id`)
  642. ) TYPE=MyISAM;
  643.  
  644. # --------------------------------------------------------
  645.  
  646. #
  647. # Table structure for table `groups`
  648. #
  649.  
  650. DROP TABLE IF EXISTS `groups`;
  651. CREATE TABLE `groups` (
  652.   `id` int(11) NOT NULL default '0',
  653.   `name` varchar(50) NOT NULL default '',
  654.   `user_id` int(11) NOT NULL default '0',
  655.   PRIMARY KEY  (`id`),
  656.   KEY `id` (`id`)
  657. ) TYPE=MyISAM;
  658.  
  659. # --------------------------------------------------------
  660.  
  661. #
  662. # Table structure for table `modules`
  663. #
  664.  
  665. DROP TABLE IF EXISTS `modules`;
  666. CREATE TABLE `modules` (
  667.   `id` varchar(20) NOT NULL default '',
  668.   `path` varchar(50) NOT NULL default '',
  669.   `acl_read` int(11) NOT NULL default '0',
  670.   `acl_write` int(11) NOT NULL default '0',
  671.   PRIMARY KEY  (`id`),
  672.   KEY `id` (`id`)
  673. ) TYPE=MyISAM;
  674.  
  675. # --------------------------------------------------------
  676.  
  677. #
  678. # Table structure for table `no_catagories`
  679. #
  680.  
  681. DROP TABLE IF EXISTS `no_catagories`;
  682. CREATE TABLE `no_catagories` (
  683.   `id` int(11) NOT NULL default '0',
  684.   `name` varchar(50) NOT NULL default '',
  685.   PRIMARY KEY  (`id`)
  686. ) TYPE=MyISAM;
  687.  
  688. # --------------------------------------------------------
  689.  
  690. #
  691. # Table structure for table `no_notes`
  692. #
  693.  
  694. DROP TABLE IF EXISTS `no_notes`;
  695. CREATE TABLE `no_notes` (
  696.   `id` int(11) NOT NULL default '0',
  697.   `user_id` int(11) NOT NULL default '0',
  698.   `contact_id` int(11) NOT NULL default '0',
  699.   `project_id` int(11) NOT NULL default '0',
  700.   `file_path` varchar(255) NOT NULL default '0',
  701.   `catagory_id` int(11) NOT NULL default '0',
  702.   `res_user_id` int(11) NOT NULL default '0',
  703.   `due_date` int(11) NOT NULL default '0',
  704.   `ctime` int(11) NOT NULL default '0',
  705.   `mtime` int(11) NOT NULL default '0',
  706.   `name` varchar(50) NOT NULL default '',
  707.   `content` text NOT NULL,
  708.   `acl_read` int(11) NOT NULL default '0',
  709.   `acl_write` int(11) NOT NULL default '0',
  710.   PRIMARY KEY  (`id`),
  711.   KEY `user_id` (`user_id`,`contact_id`,`project_id`),
  712.   KEY `file_path` (`file_path`)
  713. ) TYPE=MyISAM;
  714.  
  715. # --------------------------------------------------------
  716.  
  717. #
  718. # Table structure for table `pmFees`
  719. #
  720.  
  721. DROP TABLE IF EXISTS `pmFees`;
  722. CREATE TABLE `pmFees` (
  723.   `id` int(11) NOT NULL default '0',
  724.   `name` varchar(50) NOT NULL default '',
  725.   `value` float NOT NULL default '0',
  726.   `time` int(11) NOT NULL default '0',
  727.   PRIMARY KEY  (`id`),
  728.   KEY `id` (`id`)
  729. ) TYPE=MyISAM;
  730.  
  731. # --------------------------------------------------------
  732.  
  733. #
  734. # Table structure for table `pmHours`
  735. #
  736.  
  737. DROP TABLE IF EXISTS `pmHours`;
  738. CREATE TABLE `pmHours` (
  739.   `id` int(11) NOT NULL default '0',
  740.   `project_id` int(11) NOT NULL default '0',
  741.   `user_id` int(11) NOT NULL default '0',
  742.   `start_time` int(11) NOT NULL default '0',
  743.   `end_time` int(11) NOT NULL default '0',
  744.   `break_time` int(11) NOT NULL default '0',
  745.   `unit_value` int(11) NOT NULL default '0',
  746.   `comments` text NOT NULL,
  747.   PRIMARY KEY  (`id`),
  748.   KEY `id` (`id`)
  749. ) TYPE=MyISAM;
  750.  
  751. # --------------------------------------------------------
  752.  
  753. #
  754. # Table structure for table `pmMaterials`
  755. #
  756.  
  757. DROP TABLE IF EXISTS `pmMaterials`;
  758. CREATE TABLE `pmMaterials` (
  759.   `id` int(11) NOT NULL default '0',
  760.   `name` varchar(50) NOT NULL default '',
  761.   `value` double NOT NULL default '0',
  762.   `description` text NOT NULL,
  763.   PRIMARY KEY  (`id`),
  764.   KEY `id` (`id`)
  765. ) TYPE=MyISAM;
  766.  
  767. # --------------------------------------------------------
  768.  
  769. #
  770. # Table structure for table `pmProjects`
  771. #
  772.  
  773. DROP TABLE IF EXISTS `pmProjects`;
  774. CREATE TABLE `pmProjects` (
  775.   `id` int(11) NOT NULL default '0',
  776.   `user_id` int(11) NOT NULL default '0',
  777.   `name` varchar(50) NOT NULL default '',
  778.   `description` varchar(50) NOT NULL default '',
  779.   `contact_id` int(11) NOT NULL default '0',
  780.   `res_user_id` int(11) NOT NULL default '0',
  781.   `acl_read` int(11) NOT NULL default '0',
  782.   `acl_write` int(11) NOT NULL default '0',
  783.   `comments` text NOT NULL,
  784.   `ctime` int(11) NOT NULL default '0',
  785.   `mtime` int(11) NOT NULL default '0',
  786.   `start_date` int(11) NOT NULL default '0',
  787.   `end_date` int(11) NOT NULL default '0',
  788.   `status` tinyint(10) NOT NULL default '0',
  789.   `probability` tinyint(4) NOT NULL default '0',
  790.   `fee_id` int(11) NOT NULL default '0',
  791.   `budget` int(11) NOT NULL default '0',
  792.   PRIMARY KEY  (`id`),
  793.   KEY `id` (`id`),
  794.   KEY `contact_id` (`contact_id`),
  795.   KEY `user_id` (`user_id`)
  796. ) TYPE=MyISAM;
  797.  
  798. # --------------------------------------------------------
  799.  
  800. #
  801. # Table structure for table `pmTimers`
  802. #
  803.  
  804. DROP TABLE IF EXISTS `pmTimers`;
  805. CREATE TABLE `pmTimers` (
  806.   `user_id` int(11) NOT NULL default '0',
  807.   `start_time` int(11) NOT NULL default '0',
  808.   `project_id` int(11) NOT NULL default '0',
  809.   PRIMARY KEY  (`user_id`)
  810. ) TYPE=MyISAM;
  811.  
  812. # --------------------------------------------------------
  813.  
  814. #
  815. # Table structure for table `settings`
  816. #
  817.  
  818. DROP TABLE IF EXISTS `settings`;
  819. CREATE TABLE `settings` (
  820.   `name` varchar(20) NOT NULL default '',
  821.   `value` text NOT NULL,
  822.   PRIMARY KEY  (`name`)
  823. ) TYPE=MyISAM;
  824.  
  825. # --------------------------------------------------------
  826.  
  827. #
  828. # Table structure for table `tp_mailing_companies`
  829. #
  830.  
  831. DROP TABLE IF EXISTS `tp_mailing_companies`;
  832. CREATE TABLE `tp_mailing_companies` (
  833.   `group_id` int(11) NOT NULL default '0',
  834.   `company_id` int(11) NOT NULL default '0',
  835.   KEY `group_id` (`group_id`)
  836. ) TYPE=MyISAM;
  837.  
  838. # --------------------------------------------------------
  839.  
  840. #
  841. # Table structure for table `tp_mailing_contacts`
  842. #
  843.  
  844. DROP TABLE IF EXISTS `tp_mailing_contacts`;
  845. CREATE TABLE `tp_mailing_contacts` (
  846.   `group_id` int(11) NOT NULL default '0',
  847.   `contact_id` int(11) NOT NULL default '0',
  848.   KEY `group_id` (`group_id`)
  849. ) TYPE=MyISAM;
  850.  
  851. # --------------------------------------------------------
  852.  
  853. #
  854. # Table structure for table `tp_mailing_groups`
  855. #
  856.  
  857. DROP TABLE IF EXISTS `tp_mailing_groups`;
  858. CREATE TABLE `tp_mailing_groups` (
  859.   `id` int(11) NOT NULL default '0',
  860.   `user_id` int(11) NOT NULL default '0',
  861.   `acl_read` int(11) NOT NULL default '0',
  862.   `acl_write` int(11) NOT NULL default '0',
  863.   `name` varchar(50) NOT NULL default '',
  864.   PRIMARY KEY  (`id`)
  865. ) TYPE=MyISAM;
  866.  
  867. # --------------------------------------------------------
  868.  
  869. #
  870. # Table structure for table `tp_subscribed`
  871. #
  872.  
  873. DROP TABLE IF EXISTS `tp_subscribed`;
  874. CREATE TABLE `tp_subscribed` (
  875.   `user_id` int(11) NOT NULL default '0',
  876.   `template_id` int(11) NOT NULL default '0',
  877.   KEY `user_id` (`user_id`,`template_id`)
  878. ) TYPE=MyISAM;
  879.  
  880. # --------------------------------------------------------
  881.  
  882. #
  883. # Table structure for table `tp_templates`
  884. #
  885.  
  886. DROP TABLE IF EXISTS `tp_templates`;
  887. CREATE TABLE `tp_templates` (
  888.   `id` int(11) NOT NULL default '0',
  889.   `user_id` int(11) NOT NULL default '0',
  890.   `type` tinyint(4) NOT NULL default '0',
  891.   `name` varchar(50) NOT NULL default '',
  892.   `content` longblob NOT NULL,
  893.   `acl_read` int(11) NOT NULL default '0',
  894.   `acl_write` int(11) NOT NULL default '0',
  895.   PRIMARY KEY  (`id`)
  896. ) TYPE=MyISAM;
  897.  
  898. # --------------------------------------------------------
  899.  
  900. #
  901. # Table structure for table `users`
  902. #
  903.  
  904. DROP TABLE IF EXISTS `users`;
  905. CREATE TABLE `users` (
  906.   `id` int(11) NOT NULL default '0',
  907.   `username` varchar(50) NOT NULL default '',
  908.   `password` varchar(64) NOT NULL default '',
  909.   `authcode` varchar(20) NOT NULL default '',
  910.   `first_name` varchar(50) NOT NULL default '',
  911.   `middle_name` varchar(50) NOT NULL default '',
  912.   `last_name` varchar(50) NOT NULL default '',
  913.   `initials` varchar(10) NOT NULL default '',
  914.   `title` varchar(10) NOT NULL default '',
  915.   `sex` enum('M','F') NOT NULL default 'M',
  916.   `birthday` date NOT NULL default '0000-00-00',
  917.   `email` varchar(100) NOT NULL default '',
  918.   `company` varchar(50) NOT NULL default '',
  919.   `department` varchar(50) NOT NULL default '',
  920.   `function` varchar(50) NOT NULL default '',
  921.   `home_phone` varchar(20) NOT NULL default '',
  922.   `work_phone` varchar(20) NOT NULL default '',
  923.   `fax` varchar(20) NOT NULL default '',
  924.   `cellular` varchar(20) NOT NULL default '',
  925.   `country` varchar(50) NOT NULL default '',
  926.   `state` varchar(50) NOT NULL default '',
  927.   `city` varchar(50) NOT NULL default '',
  928.   `zip` varchar(10) NOT NULL default '',
  929.   `address` varchar(100) NOT NULL default '',
  930.   `homepage` varchar(100) NOT NULL default '',
  931.   `work_address` varchar(100) NOT NULL default '',
  932.   `work_zip` varchar(10) NOT NULL default '',
  933.   `work_country` varchar(50) NOT NULL default '',
  934.   `work_state` varchar(50) NOT NULL default '',
  935.   `work_city` varchar(50) NOT NULL default '',
  936.   `work_fax` varchar(20) NOT NULL default '',
  937.   `acl_id` int(11) NOT NULL default '0',
  938.   `date_format` varchar(20) NOT NULL default 'd-m-Y H:i',
  939.   `time_format` varchar(10) NOT NULL default '',
  940.   `thousands_seperator` char(1) NOT NULL default '.',
  941.   `decimal_seperator` char(1) NOT NULL default ',',
  942.   `currency` char(3) NOT NULL default 'Ç',
  943.   `mail_client` tinyint(4) NOT NULL default '1',
  944.   `logins` int(11) NOT NULL default '0',
  945.   `lastlogin` int(11) NOT NULL default '0',
  946.   `registration_time` int(11) NOT NULL default '0',
  947.   `samba_user` enum('0','1') NOT NULL default '0',
  948.   `max_rows_list` tinyint(4) NOT NULL default '15',
  949.   `timezone` tinyint(4) NOT NULL default '0',
  950.   `start_module` varchar(50) NOT NULL default '',
  951.   `language` varchar(20) NOT NULL default '',
  952.   `theme` varchar(20) NOT NULL default '',
  953.   `first_weekday` tinyint(4) NOT NULL default '0',
  954.   PRIMARY KEY  (`id`),
  955.   KEY `id` (`id`)
  956. ) TYPE=MyISAM;
  957.  
  958. # --------------------------------------------------------
  959.  
  960. #
  961. # Table structure for table `users_groups`
  962. #
  963.  
  964. DROP TABLE IF EXISTS `users_groups`;
  965. CREATE TABLE `users_groups` (
  966.   `group_id` int(11) NOT NULL default '0',
  967.   `user_id` int(11) NOT NULL default '0',
  968.   KEY `group_id` (`group_id`),
  969.   KEY `user_id` (`user_id`)
  970. ) TYPE=MyISAM;
  971.