2000-12-19 23:40:54 +01:00
|
|
|
<?php
|
2008-04-20 18:34:16 +02:00
|
|
|
/**
|
2013-06-12 18:57:44 +02:00
|
|
|
* EGroupware - API Setup
|
2008-04-20 18:34:16 +02:00
|
|
|
*
|
|
|
|
* Current DB schema
|
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @package api
|
|
|
|
* @subpackage setup
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
2000-12-19 23:40:54 +01:00
|
|
|
|
2008-04-20 18:34:16 +02:00
|
|
|
$phpgw_baseline = array(
|
|
|
|
'egw_config' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'config_app' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
|
|
|
'config_name' => array('type' => 'ascii','precision' => '32','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'config_value' => array('type' => 'text')
|
|
|
|
),
|
|
|
|
'pk' => array('config_app','config_name'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_applications' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'app_id' => array('type' => 'auto','precision' => '4','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'app_name' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'app_enabled' => array('type' => 'int','precision' => '4','nullable' => False),
|
|
|
|
'app_order' => array('type' => 'int','precision' => '4','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'app_tables' => array('type' => 'ascii','precision' => '8192','nullable' => False),
|
|
|
|
'app_version' => array('type' => 'ascii','precision' => '20','nullable' => False,'default' => '0.0'),
|
|
|
|
'app_icon' => array('type' => 'ascii','precision' => '32'),
|
|
|
|
'app_icon_app' => array('type' => 'ascii','precision' => '16'),
|
|
|
|
'app_index' => array('type' => 'ascii','precision' => '64')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('app_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(array('app_enabled','app_order')),
|
|
|
|
'uc' => array('app_name')
|
|
|
|
),
|
|
|
|
'egw_acl' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'acl_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
|
|
|
'acl_location' => array('type' => 'ascii','meta' => 'account','precision' => '16','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'acl_account' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'acl_rights' => array('type' => 'int','precision' => '4'),
|
|
|
|
'acl_id' => array('type' => 'auto','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('acl_id'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array('acl_account',array('acl_location','acl_account'),array('acl_appname','acl_account')),
|
2015-07-19 12:24:53 +02:00
|
|
|
'uc' => array(array('acl_appname','acl_location','acl_account'))
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'egw_accounts' => array(
|
|
|
|
'fd' => array(
|
2013-06-12 18:57:44 +02:00
|
|
|
'account_id' => array('type' => 'auto','meta' => 'account-abs','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'account_lid' => array('type' => 'varchar','precision' => '64','nullable' => False),
|
2011-06-06 08:52:45 +02:00
|
|
|
'account_pwd' => array('type' => 'varchar','precision' => '128','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'account_lastlogin' => array('type' => 'int','precision' => '4'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'account_lastloginfrom' => array('type' => 'ascii','precision' => '48','comment' => 'ip'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'account_lastpwd_change' => array('type' => 'int','precision' => '4'),
|
|
|
|
'account_status' => array('type' => 'char','precision' => '1','nullable' => False,'default' => 'A'),
|
|
|
|
'account_expires' => array('type' => 'int','precision' => '4'),
|
|
|
|
'account_type' => array('type' => 'char','precision' => '1'),
|
2015-08-13 17:25:26 +02:00
|
|
|
'account_primary_group' => array('type' => 'int','meta' => 'group','precision' => '4','nullable' => False,'default' => '0'),
|
|
|
|
'account_description' => array('type' => 'varchar','precision' => '255','comment' => 'group description')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('account_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array('account_lid')
|
|
|
|
),
|
|
|
|
'egw_preferences' => array(
|
|
|
|
'fd' => array(
|
2013-06-12 18:57:44 +02:00
|
|
|
'preference_owner' => array('type' => 'int','meta' => 'account-prefs','precision' => '4','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'preference_app' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
|
|
|
'preference_value' => array('type' => 'text','nullable' => False),
|
|
|
|
'preference_id' => array('type' => 'auto','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('preference_id'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'uc' => array(array('preference_owner','preference_app'))
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'egw_access_log' => array(
|
|
|
|
'fd' => array(
|
2011-04-13 16:11:09 +02:00
|
|
|
'sessionid' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'),
|
|
|
|
'loginid' => array('type' => 'varchar','precision' => '64','nullable' => False,'comment' => 'username used to login'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'ip' => array('type' => 'ascii','precision' => '48','nullable' => False,'comment' => 'ip of user'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'li' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'comment' => 'TS if login'),
|
|
|
|
'lo' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TD of logout'),
|
|
|
|
'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'numerical account id'),
|
|
|
|
'session_dla' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TS of last user action'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'session_action' => array('type' => 'ascii','precision' => '64','comment' => 'menuaction or path of last user action'),
|
|
|
|
'session_php' => array('type' => 'ascii','precision' => '64','nullable' => False,'comment' => 'php session-id or error-message'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'notification_heartbeat' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TS of last notification request'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'user_agent' => array('type' => 'ascii','precision' => '255','comment' => 'User-agent of browser/device')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
2011-04-13 16:11:09 +02:00
|
|
|
'pk' => array('sessionid'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fk' => array(),
|
2012-06-12 08:29:02 +02:00
|
|
|
'ix' => array('li','lo','session_dla','session_php','notification_heartbeat',array('account_id','ip','li'),array('account_id','loginid','li')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_hooks' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'hook_id' => array('type' => 'auto','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'hook_appname' => array('type' => 'ascii','precision' => '16'),
|
|
|
|
'hook_location' => array('type' => 'ascii','precision' => '32'),
|
|
|
|
'hook_filename' => array('type' => 'ascii','precision' => '255')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('hook_id'),
|
|
|
|
'fk' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'ix' => array(),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_languages' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'lang_id' => array('type' => 'ascii','precision' => '5','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False)
|
|
|
|
),
|
|
|
|
'pk' => array('lang_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_lang' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'lang' => array('type' => 'varchar','precision' => '5','nullable' => False,'default' => ''),
|
2015-07-19 12:24:53 +02:00
|
|
|
'app_name' => array('type' => 'ascii','precision' => '16','nullable' => False,'default' => 'common'),
|
|
|
|
'message_id' => array('type' => 'ascii','precision' => '128','nullable' => False,'default' => ''),
|
|
|
|
'content' => array('type' => 'varchar','precision' => '8192'),
|
|
|
|
'lang_id' => array('type' => 'auto','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('lang_id'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'uc' => array(array('lang','app_name','message_id'))
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'egw_nextid' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'id' => array('type' => 'int','precision' => '4'),
|
|
|
|
'appname' => array('type' => 'ascii','precision' => '16','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('appname'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_categories' => array(
|
|
|
|
'fd' => array(
|
2013-06-12 18:57:44 +02:00
|
|
|
'cat_id' => array('type' => 'auto','meta' => 'category','precision' => '4','nullable' => False),
|
|
|
|
'cat_main' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False,'default' => '0'),
|
|
|
|
'cat_parent' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False,'default' => '0'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'cat_level' => array('type' => 'int','precision' => '2','nullable' => False,'default' => '0'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'cat_owner' => array('type' => 'ascii','meta' => 'account-commasep','precision' => '255','nullable' => False,'default' => '0'),
|
|
|
|
'cat_access' => array('type' => 'ascii','precision' => '7'),
|
|
|
|
'cat_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'cat_name' => array('type' => 'varchar','precision' => '150','nullable' => False),
|
|
|
|
'cat_description' => array('type' => 'varchar','precision' => '255','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'cat_data' => array('type' => 'varchar','precision' => '8192'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'last_mod' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('cat_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(array('cat_appname','cat_owner','cat_parent','cat_level')),
|
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_history_log' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'history_id' => array('type' => 'auto','precision' => '4','nullable' => False),
|
|
|
|
'history_record_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'history_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'history_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False),
|
2015-07-24 15:06:18 +02:00
|
|
|
'history_status' => array('type' => 'varchar','precision' => '32','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'history_new_value' => array('type' => 'text','nullable' => False),
|
|
|
|
'history_timestamp' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
|
2012-06-01 15:13:06 +02:00
|
|
|
'history_old_value' => array('type' => 'text','nullable' => False),
|
|
|
|
'sessionid' => array('type' => 'int','precision' => '4','comment' => 'primary key to egw_access_log')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('history_id'),
|
|
|
|
'fk' => array(),
|
2012-07-05 11:24:51 +02:00
|
|
|
'ix' => array(array('history_appname','history_record_id','history_id')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_async' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'async_id' => array('type' => 'ascii','precision' => '64','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'async_next' => array('type' => 'int','meta' => 'timestamp','precision' => '4','nullable' => False,'comment' => 'timestamp of next run'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'async_times' => array('type' => 'ascii','precision' => '255','nullable' => False,'comment' => 'serialized array with values for keys hour,min,day,month,year'),
|
|
|
|
'async_method' => array('type' => 'ascii','precision' => '80','nullable' => False,'comment' => 'app.class.method class::method to execute'),
|
|
|
|
'async_data' => array('type' => 'ascii','precision' => '8192','nullable' => False,'comment' => 'serialized array with data to pass to method'),
|
|
|
|
'async_account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'creator of job'),
|
|
|
|
'async_auto_id' => array('type' => 'auto','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('async_auto_id'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'uc' => array('async_id')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'egw_api_content_history' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'sync_appname' => array('type' => 'ascii','precision' => '32','nullable' => False,'comment' => 'not just app-names!'),
|
|
|
|
'sync_contentid' => array('type' => 'ascii','precision' => '48','nullable' => False,'comment' => 'eworkflow uses 36-char uuids'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'sync_added' => array('type' => 'timestamp'),
|
|
|
|
'sync_modified' => array('type' => 'timestamp'),
|
|
|
|
'sync_deleted' => array('type' => 'timestamp'),
|
|
|
|
'sync_id' => array('type' => 'auto','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'sync_changedby' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('sync_id'),
|
|
|
|
'fk' => array(),
|
2008-11-10 07:47:09 +01:00
|
|
|
'ix' => array('sync_added','sync_modified','sync_deleted','sync_changedby',array('sync_appname','sync_contentid')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_links' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'link_id' => array('type' => 'auto','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'link_app1' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
|
|
|
'link_id1' => array('type' => 'ascii','meta' => array("link_app1='home-accounts'" => 'account'),'precision' => '64','nullable' => False),
|
|
|
|
'link_app2' => array('type' => 'ascii','precision' => '16','nullable' => False),
|
|
|
|
'link_id2' => array('type' => 'ascii','meta' => array("link_app2='home-accounts'" => 'account'),'precision' => '64','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'link_remark' => array('type' => 'varchar','precision' => '100'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'link_lastmod' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False),
|
|
|
|
'link_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
|
2010-09-27 18:27:48 +02:00
|
|
|
'deleted' => array('type' => 'timestamp')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('link_id'),
|
|
|
|
'fk' => array(),
|
2010-09-27 18:27:48 +02:00
|
|
|
'ix' => array('deleted',array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_addressbook' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'contact_id' => array('type' => 'auto','nullable' => False),
|
|
|
|
'contact_tid' => array('type' => 'char','precision' => '1','default' => 'n'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'contact_owner' => array('type' => 'int','meta' => 'account','precision' => '8','nullable' => False,'comment' => 'account or group id of the adressbook'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'contact_private' => array('type' => 'int','precision' => '1','default' => '0','comment' => 'privat or personal'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'cat_id' => array('type' => 'ascii','meta' => 'category','precision' => '255','comment' => 'Category(s)'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'n_family' => array('type' => 'varchar','precision' => '64','comment' => 'Family name'),
|
|
|
|
'n_given' => array('type' => 'varchar','precision' => '64','comment' => 'Given Name'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'n_middle' => array('type' => 'varchar','precision' => '64'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'n_prefix' => array('type' => 'varchar','precision' => '64','comment' => 'Prefix'),
|
|
|
|
'n_suffix' => array('type' => 'varchar','precision' => '64','comment' => 'Suffix'),
|
|
|
|
'n_fn' => array('type' => 'varchar','precision' => '128','comment' => 'Full name'),
|
|
|
|
'n_fileas' => array('type' => 'varchar','precision' => '255','comment' => 'sort as'),
|
|
|
|
'contact_bday' => array('type' => 'varchar','precision' => '12','comment' => 'Birtday'),
|
|
|
|
'org_name' => array('type' => 'varchar','precision' => '128','comment' => 'Organisation'),
|
|
|
|
'org_unit' => array('type' => 'varchar','precision' => '64','comment' => 'Department'),
|
|
|
|
'contact_title' => array('type' => 'varchar','precision' => '64','comment' => 'jobtittle'),
|
|
|
|
'contact_role' => array('type' => 'varchar','precision' => '64','comment' => 'role'),
|
|
|
|
'contact_assistent' => array('type' => 'varchar','precision' => '64','comment' => 'Name of the Assistent (for phone number)'),
|
|
|
|
'contact_room' => array('type' => 'varchar','precision' => '64','comment' => 'room'),
|
|
|
|
'adr_one_street' => array('type' => 'varchar','precision' => '64','comment' => 'street (business)'),
|
|
|
|
'adr_one_street2' => array('type' => 'varchar','precision' => '64','comment' => 'street (business) - 2. line'),
|
|
|
|
'adr_one_locality' => array('type' => 'varchar','precision' => '64','comment' => 'city (business)'),
|
|
|
|
'adr_one_region' => array('type' => 'varchar','precision' => '64','comment' => 'region (business)'),
|
|
|
|
'adr_one_postalcode' => array('type' => 'varchar','precision' => '64','comment' => 'postalcode (business)'),
|
|
|
|
'adr_one_countryname' => array('type' => 'varchar','precision' => '64','comment' => 'countryname (business)'),
|
|
|
|
'contact_label' => array('type' => 'text','comment' => 'currently not used'),
|
|
|
|
'adr_two_street' => array('type' => 'varchar','precision' => '64','comment' => 'street (private)'),
|
|
|
|
'adr_two_street2' => array('type' => 'varchar','precision' => '64','comment' => 'street (private) - 2. line'),
|
|
|
|
'adr_two_locality' => array('type' => 'varchar','precision' => '64','comment' => 'city (private)'),
|
|
|
|
'adr_two_region' => array('type' => 'varchar','precision' => '64','comment' => 'region (private)'),
|
|
|
|
'adr_two_postalcode' => array('type' => 'varchar','precision' => '64','comment' => 'postalcode (private)'),
|
|
|
|
'adr_two_countryname' => array('type' => 'varchar','precision' => '64','comment' => 'countryname (private)'),
|
|
|
|
'tel_work' => array('type' => 'varchar','precision' => '40','comment' => 'phone-number (business)'),
|
|
|
|
'tel_cell' => array('type' => 'varchar','precision' => '40','comment' => 'mobil phone (business)'),
|
|
|
|
'tel_fax' => array('type' => 'varchar','precision' => '40','comment' => 'fax-number (business)'),
|
|
|
|
'tel_assistent' => array('type' => 'varchar','precision' => '40','comment' => 'phone-number assistent'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'tel_car' => array('type' => 'varchar','precision' => '40'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'tel_pager' => array('type' => 'varchar','precision' => '40','comment' => 'pager'),
|
|
|
|
'tel_home' => array('type' => 'varchar','precision' => '40','comment' => 'phone-number (private)'),
|
|
|
|
'tel_fax_home' => array('type' => 'varchar','precision' => '40','comment' => 'fax-number (private)'),
|
|
|
|
'tel_cell_private' => array('type' => 'varchar','precision' => '40','comment' => 'mobil phone (private)'),
|
|
|
|
'tel_other' => array('type' => 'varchar','precision' => '40','comment' => 'other phone'),
|
|
|
|
'tel_prefer' => array('type' => 'varchar','precision' => '32','comment' => 'prefered phone-number'),
|
|
|
|
'contact_email' => array('type' => 'varchar','precision' => '128','comment' => 'email address (business)'),
|
|
|
|
'contact_email_home' => array('type' => 'varchar','precision' => '128','comment' => 'email address (private)'),
|
|
|
|
'contact_url' => array('type' => 'varchar','precision' => '128','comment' => 'website (business)'),
|
|
|
|
'contact_url_home' => array('type' => 'varchar','precision' => '128','comment' => 'website (private)'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'contact_freebusy_uri' => array('type' => 'ascii','precision' => '128','comment' => 'freebusy-url for calendar of the contact'),
|
|
|
|
'contact_calendar_uri' => array('type' => 'ascii','precision' => '128','comment' => 'url for users calendar - currently not used'),
|
|
|
|
'contact_note' => array('type' => 'varchar','precision' => '8192','comment' => 'notes field'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'contact_tz' => array('type' => 'varchar','precision' => '8','comment' => 'timezone difference'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'contact_geo' => array('type' => 'ascii','precision' => '32','comment' => 'currently not used'),
|
|
|
|
'contact_pubkey' => array('type' => 'ascii','precision' => '8192','comment' => 'public key'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'contact_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'timestamp of the creation'),
|
|
|
|
'contact_creator' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account id of the creator'),
|
|
|
|
'contact_modified' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'comment' => 'timestamp of the last modified'),
|
|
|
|
'contact_modifier' => array('type' => 'int','meta' => 'user','precision' => '4','comment' => 'account id of the last modified'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'contact_jpegphoto' => array('type' => 'blob','comment' => 'photo of the contact (attachment)'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','comment' => 'account id'),
|
2012-09-21 13:59:44 +02:00
|
|
|
'contact_etag' => array('type' => 'int','precision' => '4','default' => '0','comment' => 'etag of the changes'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'contact_uid' => array('type' => 'ascii','precision' => '128','comment' => 'unique id of the contact'),
|
|
|
|
'adr_one_countrycode' => array('type' => 'ascii','precision' => '2','comment' => 'countrycode (business)'),
|
|
|
|
'adr_two_countrycode' => array('type' => 'ascii','precision' => '2','comment' => 'countrycode (private)'),
|
|
|
|
'carddav_name' => array('type' => 'ascii','precision' => '128','comment' => 'name part of CardDAV URL, if specified by client')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('contact_id'),
|
|
|
|
'fk' => array(),
|
2012-01-04 22:55:06 +01:00
|
|
|
'ix' => array('contact_owner','cat_id','n_fileas','contact_modified','contact_uid','carddav_name',array('n_family','n_given'),array('n_given','n_family'),array('org_name','n_family','n_given')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array('account_id')
|
|
|
|
),
|
|
|
|
'egw_addressbook_extra' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'contact_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'contact_owner' => array('type' => 'int','meta' => 'account','precision' => '8'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'contact_name' => array('type' => 'varchar','meta' => 'cfname','precision' => '64','nullable' => False,'comment' => 'custom-field name'),
|
|
|
|
'contact_value' => array('type' => 'varchar','meta' => 'cfvalue','precision' => '16384','comment' => 'custom-field value'),
|
|
|
|
'contact_extra_id' => array('type' => 'auto','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('contact_extra_id'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fk' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'ix' => array('contact_name',array('contact_id','contact_name')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_addressbook_lists' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'list_id' => array('type' => 'auto','nullable' => False),
|
|
|
|
'list_name' => array('type' => 'varchar','precision' => '80','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'list_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
|
|
|
|
'list_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8'),
|
|
|
|
'list_creator' => array('type' => 'int','meta' => 'user','precision' => '4'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'list_uid' => array('type' => 'ascii','precision' => '128'),
|
|
|
|
'list_carddav_name' => array('type' => 'ascii','precision' => '128'),
|
2012-02-10 11:09:18 +01:00
|
|
|
'list_etag' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
|
|
|
|
'list_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'list_modifier' => array('type' => 'int','meta' => 'user','precision' => '4')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('list_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
2012-02-10 11:09:18 +01:00
|
|
|
'uc' => array('list_uid','list_carddav_name',array('list_owner','list_name'))
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'egw_addressbook2list' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'contact_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
|
|
|
'list_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'list_added' => array('type' => 'int','meta' => 'timestamp','precision' => '8'),
|
|
|
|
'list_added_by' => array('type' => 'int','meta' => 'user','precision' => '4')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('contact_id','list_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_sqlfs' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'fs_id' => array('type' => 'auto','nullable' => False),
|
|
|
|
'fs_dir' => array('type' => 'int','precision' => '4','nullable' => False),
|
|
|
|
'fs_name' => array('type' => 'varchar','precision' => '200','nullable' => False),
|
|
|
|
'fs_mode' => array('type' => 'int','precision' => '2','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'fs_uid' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0'),
|
|
|
|
'fs_gid' => array('type' => 'int','meta' => 'group-abs','precision' => '4','nullable' => False,'default' => '0'),
|
2008-10-05 19:07:36 +02:00
|
|
|
'fs_created' => array('type' => 'timestamp','precision' => '8','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fs_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'fs_mime' => array('type' => 'ascii','precision' => '96','nullable' => False),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fs_size' => array('type' => 'int','precision' => '8','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'fs_creator' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False),
|
|
|
|
'fs_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'),
|
2008-04-20 18:34:16 +02:00
|
|
|
'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'),
|
2009-05-12 09:21:57 +02:00
|
|
|
'fs_content' => array('type' => 'blob'),
|
|
|
|
'fs_link' => array('type' => 'varchar','precision' => '255')
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('fs_id'),
|
|
|
|
'fk' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'ix' => array(array('fs_dir','fs_active','fs_name(16)')),
|
2008-04-20 18:34:16 +02:00
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_index_keywords' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'si_id' => array('type' => 'auto','nullable' => False),
|
|
|
|
'si_keyword' => array('type' => 'varchar','precision' => '64','nullable' => False),
|
|
|
|
'si_ignore' => array('type' => 'bool')
|
|
|
|
),
|
|
|
|
'pk' => array('si_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array('si_keyword')
|
|
|
|
),
|
|
|
|
'egw_index' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'si_app' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
|
|
|
'si_app_id' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
|
|
|
'si_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'si_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('si_app','si_app_id','si_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array('si_id'),
|
|
|
|
'uc' => array()
|
|
|
|
),
|
|
|
|
'egw_cat2entry' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'ce_app' => array('type' => 'varchar','precision' => '25','nullable' => False),
|
|
|
|
'ce_app_id' => array('type' => 'varchar','precision' => '50','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'cat_id' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False),
|
|
|
|
'ce_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False)
|
2008-04-20 18:34:16 +02:00
|
|
|
),
|
|
|
|
'pk' => array('ce_app','ce_app_id','cat_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array('cat_id'),
|
|
|
|
'uc' => array()
|
2008-05-01 13:44:55 +02:00
|
|
|
),
|
|
|
|
'egw_locks' => array(
|
|
|
|
'fd' => array(
|
2015-07-19 12:24:53 +02:00
|
|
|
'lock_token' => array('type' => 'ascii','precision' => '64','nullable' => False),
|
2008-05-01 13:44:55 +02:00
|
|
|
'lock_path' => array('type' => 'varchar','precision' => '255','nullable' => False),
|
2013-06-12 18:57:44 +02:00
|
|
|
'lock_expires' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False),
|
2008-05-01 13:44:55 +02:00
|
|
|
'lock_owner' => array('type' => 'varchar','precision' => '255'),
|
|
|
|
'lock_recursive' => array('type' => 'bool','nullable' => False,'default' => '0'),
|
|
|
|
'lock_write' => array('type' => 'bool','nullable' => False,'default' => '0'),
|
|
|
|
'lock_exclusive' => array('type' => 'bool','nullable' => False,'default' => '0'),
|
2013-06-12 18:57:44 +02:00
|
|
|
'lock_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8','default' => '0'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'lock_modified' => array('type' => 'int','meta' => 'timestamp','precision' => '8','default' => '0'),
|
|
|
|
'lock_id' => array('type' => 'auto','nullable' => False)
|
2008-05-01 13:44:55 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('lock_id'),
|
2008-05-01 13:44:55 +02:00
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array('lock_path','lock_expires'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'uc' => array('lock_token')
|
2008-10-05 19:07:36 +02:00
|
|
|
),
|
|
|
|
'egw_sqlfs_props' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'fs_id' => array('type' => 'int','precision' => '4','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'prop_namespace' => array('type' => 'ascii','precision' => '64','nullable' => False),
|
|
|
|
'prop_name' => array('type' => 'ascii','precision' => '64','nullable' => False),
|
|
|
|
'prop_value' => array('type' => 'ascii','precision' => '16384'),
|
|
|
|
'prop_id' => array('type' => 'auto','nullable' => False)
|
2008-10-05 19:07:36 +02:00
|
|
|
),
|
2015-07-19 12:24:53 +02:00
|
|
|
'pk' => array('prop_id'),
|
2008-10-05 19:07:36 +02:00
|
|
|
'fk' => array(),
|
2015-07-19 12:24:53 +02:00
|
|
|
'ix' => array(array('fs_id','prop_namespace','prop_name')),
|
2008-10-05 19:07:36 +02:00
|
|
|
'uc' => array()
|
2014-06-23 16:35:22 +02:00
|
|
|
),
|
|
|
|
'egw_customfields' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'cf_id' => array('type' => 'auto','nullable' => False),
|
2015-07-19 12:24:53 +02:00
|
|
|
'cf_app' => array('type' => 'ascii','precision' => '16','nullable' => False,'comment' => 'app-name cf belongs too'),
|
2014-06-23 16:35:22 +02:00
|
|
|
'cf_name' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'internal name'),
|
|
|
|
'cf_label' => array('type' => 'varchar','precision' => '128','comment' => 'label to display'),
|
|
|
|
'cf_type' => array('type' => 'varchar','precision' => '64','nullable' => False,'default' => 'text','comment' => 'type of field'),
|
|
|
|
'cf_type2' => array('type' => 'varchar','precision' => '2048','comment' => 'comma-separated subtypes of app, cf is valid for'),
|
|
|
|
'cf_help' => array('type' => 'varchar','precision' => '256','comment' => 'helptext'),
|
|
|
|
'cf_values' => array('type' => 'varchar','precision' => '8096','comment' => 'json object with value label pairs'),
|
|
|
|
'cf_len' => array('type' => 'int','precision' => '2','comment' => 'length or columns of field'),
|
|
|
|
'cf_rows' => array('type' => 'int','precision' => '2','comment' => 'rows of field'),
|
|
|
|
'cf_order' => array('type' => 'int','precision' => '2','comment' => 'order to display fields'),
|
|
|
|
'cf_needed' => array('type' => 'bool','default' => '0','comment' => 'field is required'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'cf_private' => array('type' => 'ascii','meta' => 'account-commasep','precision' => '2048','comment' => 'comma-separated account_id'),
|
2014-06-23 16:35:22 +02:00
|
|
|
'cf_modifier' => array('type' => 'int','meta' => 'account','precision' => '4','comment' => 'last modifier'),
|
2014-06-24 12:00:50 +02:00
|
|
|
'cf_modified' => array('type' => 'timestamp','default' => 'current_timestamp','comment' => 'last modification time'),
|
|
|
|
'cf_tab' => array('type' => 'varchar','precision' => '64','comment' => 'tab customfield should be shown')
|
2014-06-23 16:35:22 +02:00
|
|
|
),
|
|
|
|
'pk' => array('cf_id'),
|
|
|
|
'fk' => array(),
|
2014-06-24 12:00:50 +02:00
|
|
|
'ix' => array(array('cf_app','cf_order')),
|
|
|
|
'uc' => array(array('cf_app','cf_name'))
|
2014-11-13 18:31:36 +01:00
|
|
|
),
|
|
|
|
'egw_sharing' => array(
|
|
|
|
'fd' => array(
|
|
|
|
'share_id' => array('type' => 'auto','nullable' => False,'comment' => 'auto-id'),
|
2015-07-19 12:24:53 +02:00
|
|
|
'share_token' => array('type' => 'ascii','precision' => '64','nullable' => False,'comment' => 'secure token'),
|
2014-11-13 18:31:36 +01:00
|
|
|
'share_path' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'path to share'),
|
|
|
|
'share_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'owner of share'),
|
|
|
|
'share_expires' => array('type' => 'date','comment' => 'expire date of share'),
|
|
|
|
'share_writable' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=readable, 1=writable'),
|
|
|
|
'share_with' => array('type' => 'varchar','precision' => '4096','comment' => 'email addresses, comma seperated'),
|
|
|
|
'share_passwd' => array('type' => 'varchar','precision' => '128','comment' => 'optional password-hash'),
|
|
|
|
'share_created' => array('type' => 'timestamp','nullable' => False,'comment' => 'creation date'),
|
|
|
|
'share_last_accessed' => array('type' => 'timestamp','comment' => 'last access of share')
|
|
|
|
),
|
|
|
|
'pk' => array('share_id'),
|
|
|
|
'fk' => array(),
|
|
|
|
'ix' => array(),
|
|
|
|
'uc' => array('share_token')
|
2008-04-25 21:06:15 +02:00
|
|
|
)
|
2008-04-20 18:34:16 +02:00
|
|
|
);
|