robots.txt
#ignore local config
+/config/local.config.php
+/config/addon.config.php
/config/local.ini.php
/config/addon.ini.php
install:
- composer install
before_script:
- - cp config/local-sample.ini.php config/local.ini.php
+ - cp config/local-sample.config.php config/local.config.php
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
- mysql -utravis test < database.sql
- echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
4. If you know in advance that it will be impossible for the web server to
write or create files in the config/ subfolder, create an empty file called
-local.ini.php and make it writable by the web server.
+local.config.php and make it writable by the web server.
5. Visit your website with a web browser and follow the instructions. Please
note any error messages and correct these before continuing.
6. *If* the automated installation fails for any reason, check the following:
- - "config/local.ini.php" exists
- If not, edit local-sample.ini.php and change system settings. Rename
-to local.ini.php
+ - "config/local.config.php" exists
+ If not, edit local-sample.config.php and change system settings. Rename
+to local.config.php
- Database is populated.
If not, import the contents of "database.sql" with phpmyadmin
or mysql command line
Registration errors should all be recoverable automatically.
If you get any *critical* failure at this point, it generally indicates the
database was not installed correctly. You might wish to move/rename
-local.ini.php to another name and empty (called 'dropping') the database
+local.config.php to another name and empty (called 'dropping') the database
tables, so that you can start fresh.
****************************************************************************
database or whatever you can think of. So once the installation of your
Friendica node is done, you should make yoursef a backup plan.
-The most important file is the `config/local.ini.php` file in the base directory.
+The most important file is the `config/local.config.php` file in the base directory.
As it stores all your data, you should also have a recent dump of your
Friendica database at hand, should you have to recover your node.
#####################################################################
-- If you are unable to write the file config/local.ini.php during installation
+- If you are unable to write the file config/local.config.php during installation
due to permissions issues:
#####################################################################
create an empty file with that name and give it world-write permission.
For Linux:
-% touch config/local.ini.php
-% chmod 664 config/local.ini.php
+% touch config/local.config.php
+% chmod 664 config/local.config.php
Retry the installation. As soon as the database has been created,
******* this is important *********
-% chmod 644 config/local.ini.php
+% chmod 644 config/local.config.php
#####################################################################
- Some configurations with "suhosin" security are configured without
proc_open. These scripts themselves also use proc_open and fail, because they
are NOT called with -d suhosin.executor.func.blacklist=none.
-So the simple solution is to put the correct parameters into config/local.ini.php:
+So the simple solution is to put the correct parameters into config/local.config.php:
-[config]
-; Location of PHP command line processor
-php_path = "/usr/bin/php -d suhosin.executor.func.blacklist=none -d suhosin.executor.eval.blacklist=none"
+ 'config' => [
+ //Location of PHP command line processor
+ 'php_path' => '/usr/bin/php -d suhosin.executor.func.blacklist=none -d suhosin.executor.eval.blacklist=none',
+ ],
This is obvious as soon as you notice that the friendica-cron uses proc_open to
execute php-scripts that also use proc_open, but it took me quite some time to
Config::load();
if (empty(Config::get('system', 'pidfile'))) {
- die('Please set system.pidfile in config/local.ini.php. For example:'."\n".
- '[system]'."\n".
- 'pidfile = /path/to/daemon.pid'."\n");
+ die(<<<TXT
+Please set system.pidfile in config/local.config.php. For example:
+
+ 'system' => [
+ 'pidfile' => '/path/to/daemon.pid',
+ ],
+TXT
+ );
}
$pidfile = Config::get('system', 'pidfile');
php bin/composer.phar install
# initial config file for friendica in vagrant
-#cp /vagrant/util/htconfig.vagrant.php /vagrant/.htconfig.php
-cp /vagrant/util/local.ini.vagrant.php /vagrant/config/local.ini.php
+cp /vagrant/util/local.config.vagrant.php /vagrant/config/local.config.php
# copy the .htaccess-dist file to .htaccess so that rewrite rules work
cp /vagrant/.htaccess-dist /vagrant/.htaccess
* @brief Image storage quality.
*
* Lower numbers save space at cost of image detail.
- * For ease of upgrade, please do not change here. Set [system] jpegquality = n in config/local.ini.php,
+ * For ease of upgrade, please do not change here. Set system.jpegquality = n in config/local.config.php,
* where n is between 1 and 100, and with very poor results below about 50
*/
define('JPEG_QUALITY', 100);
/**
- * [system] png_quality = n where is between 0 (uncompressed) to 9
+ * system.png_quality = n where is between 0 (uncompressed) to 9
*/
define('PNG_QUALITY', 8);
* this length (on the longest side, the other side will be scaled appropriately).
* Modify this value using
*
- * [system]
- * max_image_length = n;
+ * 'system' => [
+ * 'max_image_length' => 'n',
+ * ...
+ * ],
*
- * in config/local.ini.php
+ * in config/local.config.php
*
* If you don't want to set a maximum length, set to -1. The default value is
* defined by 'MAX_IMAGE_LENGTH' below.
--- /dev/null
+<?php\r
+\r
+// Addon configuration\r
+\r
+// Copy this configuration file to addon.config.php and edit it if you want to configure addons, see below example for the twitter addon\r
+\r
+return [\r
+ 'twitter' => [\r
+ 'consumerkey' => 'localhost',\r
+ 'consumersecret' => 'mysqlusername',\r
+ ],\r
+];\r
+++ /dev/null
-<?php return <<<INI
-
-; Copy this configuration file to addon.ini.php and edit it if you want to configure addons, see below example for the twitter addon
-
-;[twitter]
-;consumerkey = localhost
-;consumersecret = mysqlusername
-
-INI;
-// Keep this line
+++ /dev/null
-<?php return <<<INI
-
-; CONFIG.INI.PHP
-
-; This file declares the default values for the base config of Friendica.
-; These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.ini.php
-
-; Please don't edit this file directly as its content may change in the upcoming versions.
-
-[database]
-
-; host (String)
-; Hostname or IP address of the database server.
-; Can contain the port number with the syntax "hostname:port".
-hostname =
-
-; user (String)
-; Database user name. Please don't use "root".
-username =
-
-; pass (String)
-; Database user password. Please don't use empty passwords.
-password =
-
-; base (String)
-; Database name.
-database =
-
-; charset (String)
-; Database connexion charset. Changing this value will likely corrupt special characters.
-charset = utf8mb4
-
-[config]
-
-; admin_email (Comma-separated list)
-; In order to perform system administration via the admin panel, this must precisely match the email address of the person logged in.
-admin_email =
-
-; admin_nickname (String)
-; Nickname of the main admin user, used if there are more than one admin user defined in config.admin_email.
-admin_nickname =
-
-; max_import_size (Integer)
-; Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.
-max_import_size = 200000
-
-; php_path (String)
-; Location of PHP command line processor.
-php_path = php
-
-[system]
-
-; allowed_link_protocols (Array)
-; Allowed protocols in links URLs, add at your own risk. http is always allowed.
-allowed_link_protocols[0] = ftp
-allowed_link_protocols[1] = ftps
-allowed_link_protocols[2] = mailto
-allowed_link_protocols[3] = cid
-allowed_link_protocols[4] = gopher
-
-; always_show_preview (Boolean)
-; Only show small preview picures.
-always_show_preview = false
-
-; archival_days (Integer)
-; Number of days that we try to deliver content before we archive a contact.
-archival_days = 32
-
-; auth_cookie_lifetime (Integer)
-; Number of days that should pass without any activity before a user who chose "Remember me" when logging in is considered logged out.
-auth_cookie_lifetime = 7
-
-; block_local_dir (Boolean)
-; Deny public access to the local user directory.
-block_local_dir = false
-
-; cache_driver (database|memcache|memcached|redis)
-; Whether to use Memcache or Memcached or Redis to store temporary cache.
-cache_driver = database
-
-; config_adapter (jit|preload)
-; Allow to switch the configuration adapter to improve performances at the cost of memory consumption.
-config_adapter = jit
-
-; curl_range_bytes (Integer)
-; Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".
-curl_range_bytes = 0
-
-; crawl_permit_period (Integer)
-; Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.
-crawl_permit_period = 60
-
-; db_log (Path)
-; Name of a logfile to log slow database queries.
-db_log =
-
-; db_log_index (Path)
-; Name of a logfile to log queries with bad indexes.
-db_log_index =
-
-; db_log_index_watch (Comma-separated list)
-; Watchlist of indexes to watch.
-db_log_index_watch =
-
-; db_log_index_blacklist (Comma-separated list)
-; Blacklist of indexes that shouldn't be watched.
-db_log_index_blacklist =
-
-; db_loglimit (Integer)
-; If a database call lasts longer than this value in seconds it is logged.
-; Inactive if system.db_log is empty.
-db_loglimit = 10
-
-; db_loglimit_index (Integer)
-; Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.
-db_loglimit_index = 0
-
-; db_loglimit_index_high (Integer)
-; Number of index rows to be logged anyway (for any index). 0 to disable.
-db_loglimit_index_high = 0
-
-; dbclean_expire_conversation (Integer)
-; When DBClean is enabled, any entry in the conversation table will be deleted after this many days.
-: This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.
-dbclean_expire_conversation = 90
-
-; dbclean-expire-limit (Integer)
-; This defines the number of items that are to be deleted in a single call.
-; Reduce this value when you are getting memory issues.
-dbclean-expire-limit = 1000
-
-; diaspora_test (Boolean)
-; For development only. Disables the message transfer.
-diaspora_test = false
-
-; disable_email_validation (Boolean)
-; Disables the check if a mail address is in a valid format and can be resolved via DNS.
-disable_email_validation = false
-
-; disable_url_validation (Boolean)
-; Disables the DNS lookup of an URL.
-disable_url_validation = false
-
-; disable_password_exposed (Boolean)
-; Disable the exposition check against the remote haveibeenpwned API on password change.
-disable_password_exposed = false
-
-; disable_polling (Boolean)
-; Disable the polling of DFRN and OStatus contacts through onepoll.php.
-disable_polling = false
-
-; dlogfile (Path)
-; location of the developer log file.
-dlogfile =
-
-; dlogip (String)
-; restricts develop log writes to requests originating from this IP address.
-dlogip =
-
-; free_crawls (Integer)
-; Number of "free" searches when system.permit_crawling is activated.
-free_crawls = 10
-
-; frontend_worker_timeout (Integer)
-; Value in minutes after we think that a frontend task was killed by the webserver.
-frontend_worker_timeout = 10
-
-; groupedit_image_limit (Integer)
-; Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.
-; This can alternatively be set on a per account basis in the pconfig table.
-groupedit_image_limit = 400
-
-; hsts (Boolean)
-; Enables the sending of HTTP Strict Transport Security headers.
-hsts = false
-
-; ignore_cache (Boolean)
-; For development only. Disables the item cache.
-ignore_cache = false
-
-; instances_social_key (String)
-; Key to the API of https://instances.social which retrieves data about mastodon servers.
-; See https://instances.social/api/token to get an API key.
-instances_social_key =
-
-; ipv4_resolve (Boolean)
-; Resolve IPV4 addresses only. Don't resolve to IPV6.
-ipv4_resolve = false
-
-; invitation_only (Boolean)
-; If set true registration is only possible after a current member of the node has send an invitation.
-invitation_only = false
-
-; like_no_comment (Boolean)
-; Don't update the "commented" value of an item when it is liked.
-like_no_comment = false
-
-; local_block (Boolean)
-; Used in conjunction with "block_public".
-local_block = false
-
-; local_search (Boolean)
-; Blocks search for users who are not logged in to prevent crawlers from blocking your system.
-local_search = false
-
-; local_tags (Boolean)
-; If activated, all hashtags will point to the local server.
-local_tags = false
-
-; max_batch_queue (Integer)
-; Maximum number of batched queue items for a single contact before subsequent messages are discarded.
-max_batch_queue = 1000
-
-; max_connections (Integer)
-; The maximum number of database connections which can be in use before the worker process is deferred to its next interval.
-; When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.
-max_connections = 0
-
-; max_connections_level (Integer 0-100)
-; The maximum percentage of connections that are allowed to let the worker start.
-max_connections_level = 75
-
-; max_contact_queue (Integer)
-; Maximum number of queue items for a single contact before subsequent messages are discarded.
-max_contact_queue = 500
-
-; max_image_length (Integer)
-; An alternate way of limiting picture upload sizes.
-; Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
-; Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
-; If you don't want to set a maximum length, set to -1.
-max_image_length = -1
-
-; max_processes_backend (Integer)
-; Maximum number of concurrent database processes for background tasks.
-max_processes_backend = 5
-
-; max_processes_frontend (Integer)
-; Maximum number of concurrent database processes for foreground tasks.
-max_processes_frontend = 20
-
-; maximagesize (Integer)
-; Maximum size in bytes of an uploaded photo.
-maximagesize = 800000
-
-; memcache_host (String)
-; Host name of the memcache daemon.
-memcache_host = 127.0.0.1
-
-; memcache_port (Integer)
-; Port number of the memcache daemon.
-memcache_port = 11211
-
-; memcached_hosts (Array)
-; Array of Memcached servers info "host, port(, weight)".
-memcached_hosts[0] = 127.0.0.1,11211
-
-; min_poll_interval (Integer)
-; minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.
-min_poll_interval = 1
-
-; no_count (Boolean)
-; Don't do count calculations (currently only when showing albums).
-no_count = false
-
-; no_oembed (Boolean)
-; Don't use OEmbed to fetch more information about a link.
-no_oembed = false
-
-; no_smilies (Boolean)
-; Don't show smilies.
-no_smilies = false
-
-; no_view_full_size (Boolean)
-; Don't add the link "View full size" under a resized image.
-no_view_full_size = false
-
-; optimize_items (Boolean)
-; Triggers an SQL command to optimize the item table before expiring items.
-optimize_items = false
-
-; paranoia (Boolean)
-; Log out users if their IP address changed.
-paranoia = false
-
-; permit_crawling (Boolean)
-; Restricts the search for not logged in users to one search per minute.
-permit_crawling = false
-
-; pidfile (Path)
-; Daemon pid file path. For example: pidfile = /path/to/daemon.pid
-pidfile =
-
-; png_quality (Integer)
-; Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).
-png_quality = 8
-
-; profiler (Boolean)
-; Enable internal timings to help optimize code. Needed for "rendertime" addon.
-profiler = false
-
-; proxy_cache_time (Integer)
-; Period in seconds after which the cache is cleared.
-proxy_cache_time = 86400
-
-; pushpoll_frequency (Integer)
-; Frequency of contact poll for subhub contact using the DFRM or OStatus network.
-; Available values:
-; - 5 = every month
-; - 4 = every week
-; - 3 = every day
-; - 2 = twice a day
-; - 1 = every hour
-; - 0 = every minute
-pushpoll_frequency = 3
-
-; queue_no_dead_check (Boolean)
-; Ignore if the target contact or server seems to be dead during queue delivery.
-queue_no_dead_check = false
-
-; redis_host (String)
-; Host name of the redis daemon.
-redis_host = 127.0.0.1
-
-; redis_port (String)
-; Port number of the redis daemon.
-redis_port = 6379
-
-; session_handler (database|cache|native)
-; Whether to use Cache to store session data or to use PHP native session storage.
-session_handler = database
-
-; remove_multiplicated_lines (Boolean)
-; If enabled, multiple linefeeds in items are stripped to a single one.
-remove_multiplicated_lines = false
-
-; sendmail_params (Boolean)
-; Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.
-; This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.
-; Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.
-sendmail_params = true
-
-; show_global_community_hint (Boolean)
-; When the global community page is enabled, use this option to display a hint above the stream, that this is a collection of all public top-level postings that arrive on your node.
-show_global_community_hint = false
-
-; show_unsupported_addons (Boolean)
-; Show all addons including the unsupported ones.
-show_unsupported_addons = false
-
-; show_unsupported_themes (Boolean)
-; Show all themes including the unsupported ones.
-show_unsupported_themes = false
-
-; throttle_limit_day (Integer)
-; Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.
-throttle_limit_day = 0
-
-; throttle_limit_week (Integer)
-; Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.
-throttle_limit_week = 0
-
-; throttle_limit_month (Integer)
-; Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.
-throttle_limit_month = 0
-
-; urlpath (String)
-; If you are using a subdirectory of your domain you will need to put the relative path (from the root of your domain) here.
-; For instance if your URL is 'http://example.com/directory/subdirectory', set urlpath to 'directory/subdirectory'.
-urlpath =
-
-; username_min_length (Integer)
-; The minimum character length a username can be.
-; This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
-; Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
-username_min_length = 3
-
-; username_max_length (Integer)
-; The maximum character length a username can be.
-; This length is check once the username has been trimmed and multiple spaces have been collapsed into one.
-; Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.
-username_max_length = 48
-
-; worker_cooldown (Integer)
-; Cooldown period in seconds after each worker function call.
-worker_cooldown = 0
-
-; worker_debug (Boolean)
-; If enabled, it prints out the number of running processes split by priority.
-worker_debug = false
-
-; worker_fetch_limit (Integer)
-; Number of worker tasks that are fetched in a single query.
-worker_fetch_limit = 1
-
-; worker_load_exponent (Integer)
-; Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
-; For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
-; Setting 0 would allow maximum worker queues at all times, which is not recommended.
-worker_load_exponent = 3
-
-; xrd_timeout (Integer)
-; Timeout in seconds for fetching the XRD links.
-xrd_timeout = 20
-
-[experimental]
-
-; exp_themes (Boolean)
-; Show experimental themes in user settings.
-exp_themes = false
-
-[theme]
-
-; hide_eventlist (Boolean)
-; Don't show the birthdays and events on the profile and network page.
-hide_eventlist = false
-
-[jabber]
-
-; debug (Boolean)
-; Enable debug level for the jabber account synchronisation.
-debug = false
-
-; lockpath (Path)
-; Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.
-lockpath =
-
-INI;
-// Keep this line
--- /dev/null
+<?php
+
+/* Main database structure configuration file.
+ *
+ * Here are described all the tables, fields and indexes Friendica needs to work.
+ *
+ * Syntax (braces indicate optionale values):
+ * "<table name>" => [
+ * "comment" => "Description of the table",
+ * "fields" => [
+ * "<field name>" => [
+ * "type" => "<field type>{(<field size>)} <unsigned>",
+ * "not null" => 0|1,
+ * {"extra" => "auto_increment",}
+ * {"default" => "<default value>",}
+ * {"default" => NULL_DATE,} (for datetime fields)
+ * {"primary" => "1",}
+ * {"relation" => ["<foreign key table name>" => "<foreign key field name>"],}
+ * "comment" => "Description of the fields"
+ * ],
+ * ...
+ * ],
+ * "indexes" => [
+ * "PRIMARY" => ["<primary key field name>", ...],
+ * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
+ * ...
+ * ],
+ * ],
+ *
+ * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
+ *
+ */
+
+use Friendica\Database\DBA;
+
+if (!defined('DB_UPDATE_VERSION')) {
+ define('DB_UPDATE_VERSION', 1290);
+}
+
+return [
+ "addon" => [
+ "comment" => "registered addons",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+ "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
+ "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
+ "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
+ "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
+ "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
+ "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "name" => ["UNIQUE", "name"],
+ ]
+ ],
+ "apcontact" => [
+ "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
+ "fields" => [
+ "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
+ "uuid" => ["type" => "varchar(255)", "comment" => ""],
+ "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
+ "following" => ["type" => "varchar(255)", "comment" => ""],
+ "followers" => ["type" => "varchar(255)", "comment" => ""],
+ "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
+ "outbox" => ["type" => "varchar(255)", "comment" => ""],
+ "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
+ "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "name" => ["type" => "varchar(255)", "comment" => ""],
+ "about" => ["type" => "text", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "comment" => ""],
+ "addr" => ["type" => "varchar(255)", "comment" => ""],
+ "alias" => ["type" => "varchar(255)", "comment" => ""],
+ "pubkey" => ["type" => "text", "comment" => ""],
+ "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
+ "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["url"],
+ "addr" => ["addr(32)"],
+ "alias" => ["alias(190)"],
+ "url" => ["followers(190)"]
+ ]
+ ],
+ "attach" => [
+ "comment" => "file attachments",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
+ "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
+ "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
+ "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
+ "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
+ "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
+ "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
+ "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+ "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+ "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "auth_codes" => [
+ "comment" => "OAuth usage",
+ "fields" => [
+ "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
+ "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => ["clients" => "client_id"],
+ "comment" => ""],
+ "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
+ "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+ "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "cache" => [
+ "comment" => "Stores temporary data",
+ "fields" => [
+ "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
+ "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
+ "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
+ "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["k"],
+ "k_expires" => ["k", "expires"],
+ ]
+ ],
+ "challenge" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "clients" => [
+ "comment" => "OAuth usage",
+ "fields" => [
+ "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
+ "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
+ "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
+ "name" => ["type" => "text", "comment" => ""],
+ "icon" => ["type" => "text", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["client_id"],
+ ]
+ ],
+ "config" => [
+ "comment" => "main configuration storage",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+ "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
+ "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
+ "v" => ["type" => "mediumtext", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "cat_k" => ["UNIQUE", "cat", "k"],
+ ]
+ ],
+ "contact" => [
+ "comment" => "contact table",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
+ "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
+ "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network protocol of the contact"],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
+ "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
+ "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "about" => ["type" => "text", "comment" => ""],
+ "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
+ "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
+ "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
+ "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
+ "site-pubkey" => ["type" => "text", "comment" => ""],
+ "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
+ "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
+ "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "request" => ["type" => "varchar(255)", "comment" => ""],
+ "notify" => ["type" => "varchar(255)", "comment" => ""],
+ "poll" => ["type" => "varchar(255)", "comment" => ""],
+ "confirm" => ["type" => "varchar(255)", "comment" => ""],
+ "poco" => ["type" => "varchar(255)", "comment" => ""],
+ "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
+ "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
+ "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
+ "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
+ "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+ "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
+ "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
+ "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
+ "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+ "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+ "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
+ "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+ "reason" => ["type" => "text", "comment" => ""],
+ "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
+ "info" => ["type" => "mediumtext", "comment" => ""],
+ "profile-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
+ "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
+ "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "ffi_keyword_blacklist" => ["type" => "text", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_name" => ["uid", "name(190)"],
+ "self_uid" => ["self", "uid"],
+ "alias_uid" => ["alias(32)", "uid"],
+ "pending_uid" => ["pending", "uid"],
+ "blocked_uid" => ["blocked", "uid"],
+ "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
+ "uid_network_batch" => ["uid", "network", "batch(64)"],
+ "addr_uid" => ["addr(32)", "uid"],
+ "nurl_uid" => ["nurl(32)", "uid"],
+ "nick_uid" => ["nick(32)", "uid"],
+ "dfrn-id" => ["dfrn-id(64)"],
+ "issued-id" => ["issued-id(64)"],
+ ]
+ ],
+ "conv" => [
+ "comment" => "private messages",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
+ "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
+ "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
+ "subject" => ["type" => "text", "comment" => "subject of initial message"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid" => ["uid"],
+ ]
+ ],
+ "conversation" => [
+ "comment" => "Raw data and structure information for messages",
+ "fields" => [
+ "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
+ "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
+ "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
+ "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
+ "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
+ "source" => ["type" => "mediumtext", "comment" => "Original source"],
+ "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["item-uri"],
+ "conversation-uri" => ["conversation-uri"],
+ "received" => ["received"],
+ ]
+ ],
+ "diaspora-interaction" => [
+ "comment" => "Signed Diaspora Interaction",
+ "fields" => [
+ "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+ "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uri-id"]
+ ]
+ ],
+ "event" => [
+ "comment" => "Events",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
+ "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
+ "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
+ "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
+ "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
+ "summary" => ["type" => "text", "comment" => "short description or title of the event"],
+ "desc" => ["type" => "text", "comment" => "event description"],
+ "location" => ["type" => "text", "comment" => "event location"],
+ "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
+ "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
+ "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
+ "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
+ "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
+ "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+ "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+ "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_start" => ["uid", "start"],
+ ]
+ ],
+ "fcontact" => [
+ "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
+ "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "pubkey" => ["type" => "text", "comment" => ""],
+ "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "addr" => ["addr(32)"],
+ "url" => ["UNIQUE", "url(190)"],
+ ]
+ ],
+ "fsuggest" => [
+ "comment" => "friend suggestion stuff",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "note" => ["type" => "text", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "gcign" => [
+ "comment" => "contacts ignored by friend suggestions",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Local User id"],
+ "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => "gcontact.id of ignored contact"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid" => ["uid"],
+ "gcid" => ["gcid"],
+ ]
+ ],
+ "gcontact" => [
+ "comment" => "global contacts",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
+ "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Link to the contacts profile page"],
+ "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Link to the profile photo"],
+ "connect" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "about" => ["type" => "text", "comment" => ""],
+ "keywords" => ["type" => "text", "comment" => "puplic keywords (interests)"],
+ "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "birthday" => ["type" => "varchar(32)", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
+ "community" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if contact is forum account"],
+ "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""],
+ "hide" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = should be hidden from search"],
+ "nsfw" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = contact posts nsfw content"],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "social network protocol"],
+ "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "notify" => ["type" => "varchar(255)", "comment" => ""],
+ "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "generation" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "server_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "baseurl of the contacts server"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "nurl" => ["UNIQUE", "nurl(190)"],
+ "name" => ["name(64)"],
+ "nick" => ["nick(32)"],
+ "addr" => ["addr(64)"],
+ "hide_network_updated" => ["hide", "network", "updated"],
+ "updated" => ["updated"],
+ ]
+ ],
+ "glink" => [
+ "comment" => "'friends of friends' linkages derived from poco",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+ "zcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+ "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "cid_uid_gcid_zcid" => ["UNIQUE", "cid", "uid", "gcid", "zcid"],
+ "gcid" => ["gcid"],
+ ]
+ ],
+ "group" => [
+ "comment" => "privacy groups, group info",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
+ "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid" => ["uid"],
+ ]
+ ],
+ "group_member" => [
+ "comment" => "privacy groups, member info",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["group" => "id"], "comment" => "groups.id of the associated group"],
+ "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "contactid" => ["contact-id"],
+ "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
+ ]
+ ],
+ "gserver" => [
+ "comment" => "Global servers",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "info" => ["type" => "text", "comment" => ""],
+ "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+ "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
+ "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
+ "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
+ "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "nurl" => ["UNIQUE", "nurl(190)"],
+ ]
+ ],
+ "gserver-tag" => [
+ "comment" => "Tags that the server has subscribed",
+ "fields" => [
+ "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gserver" => "id"], "primary" => "1",
+ "comment" => "The id of the gserver"],
+ "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["gserver-id", "tag"],
+ "tag" => ["tag"],
+ ]
+ ],
+ "hook" => [
+ "comment" => "addon hook registry",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
+ "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
+ "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
+ "priority" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => "not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
+ ]
+ ],
+ "intro" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "fid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["fcontact" => "id"], "comment" => ""],
+ "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+ "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "note" => ["type" => "text", "comment" => ""],
+ "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+ "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "item" => [
+ "comment" => "Structure for all posts",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this item"],
+ "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+ "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
+ "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item"],
+ "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "uri of the parent to this item"],
+ "parent-uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
+ "thr-parent" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri"],
+ "thr-parent-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
+ "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
+ "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last comment/reply to this item"],
+ "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
+ "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date that something in the conversation changed, indicating clients should fetch the conversation again"],
+ "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
+ "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the owner of this item"],
+ "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the author of this item"],
+ "icid" => ["type" => "int unsigned", "relation" => ["item-content" => "id"], "comment" => "Id of the item-content table entry that contains the whole item content"],
+ "iaid" => ["type" => "int unsigned", "relation" => ["item-activity" => "id"], "comment" => "Id of the item-activity table entry that contains the activity data"],
+ "extid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
+ "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "distribution is restricted"],
+ "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been deleted"],
+ // User specific fields. Eventually they will move to user-item
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
+ "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
+ "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
+ "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
+ "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been favourited"],
+ "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "item has not been seen"],
+ "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The owner of this item was mentioned in it"],
+ "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "psid" => ["type" => "int unsigned", "relation" => ["permissionset" => "id"], "comment" => "ID of the permission set of this post"],
+ // It has to be decided whether these fields belong to the user or the structure
+ "resource-id" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type"],
+ "event-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => "Used to link to the event.id"],
+ // Could possibly be replaced by the "attach" table?
+ "attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
+ // Deprecated fields. Will be removed in upcoming versions
+ "allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "deny_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "postopts" => ["type" => "text", "comment" => "Deprecated"],
+ "inform" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "type" => ["type" => "varchar(20)", "comment" => "Deprecated"],
+ "bookmark" => ["type" => "boolean", "comment" => "Deprecated"],
+ "file" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "location" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "coord" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "tag" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "plink" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "title" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "content-warning" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "body" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ "app" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "verb" => ["type" => "varchar(100)", "comment" => "Deprecated"],
+ "object-type" => ["type" => "varchar(100)", "comment" => "Deprecated"],
+ "object" => ["type" => "text", "comment" => "Deprecated"],
+ "target-type" => ["type" => "varchar(100)", "comment" => "Deprecated"],
+ "target" => ["type" => "text", "comment" => "Deprecated"],
+ "author-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "author-link" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "author-avatar" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "owner-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "owner-link" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "owner-avatar" => ["type" => "varchar(255)", "comment" => "Deprecated"],
+ "rendered-hash" => ["type" => "varchar(32)", "comment" => "Deprecated"],
+ "rendered-html" => ["type" => "mediumtext", "comment" => "Deprecated"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "guid" => ["guid(191)"],
+ "uri" => ["uri(191)"],
+ "parent" => ["parent"],
+ "parent-uri" => ["parent-uri(191)"],
+ "extid" => ["extid(191)"],
+ "uid_id" => ["uid", "id"],
+ "uid_contactid_id" => ["uid", "contact-id", "id"],
+ "uid_created" => ["uid", "created"],
+ "uid_commented" => ["uid", "commented"],
+ "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
+ "uid_network_received" => ["uid", "network", "received"],
+ "uid_network_commented" => ["uid", "network", "commented"],
+ "uid_thrparent" => ["uid", "thr-parent(190)"],
+ "uid_parenturi" => ["uid", "parent-uri(190)"],
+ "uid_contactid_created" => ["uid", "contact-id", "created"],
+ "authorid_created" => ["author-id", "created"],
+ "ownerid" => ["owner-id"],
+ "uid_uri" => ["uid", "uri(190)"],
+ "resource-id" => ["resource-id"],
+ "deleted_changed" => ["deleted", "changed"],
+ "uid_wall_changed" => ["uid", "wall", "changed"],
+ "uid_eventid" => ["uid", "event-id"],
+ "icid" => ["icid"],
+ "iaid" => ["iaid"],
+ "psid_wall" => ["psid", "wall"],
+ ]
+ ],
+ "item-activity" => [
+ "comment" => "Activities for items",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
+ "uri" => ["type" => "varchar(255)", "comment" => ""],
+ "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+ "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
+ "activity" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uri-hash" => ["UNIQUE", "uri-hash"],
+ "uri" => ["uri(191)"],
+ "uri-id" => ["uri-id"]
+ ]
+ ],
+ "item-content" => [
+ "comment" => "Content for all posts",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
+ "uri" => ["type" => "varchar(255)", "comment" => ""],
+ "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
+ "uri-plink-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
+ "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
+ "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "body" => ["type" => "mediumtext", "comment" => "item body content"],
+ "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
+ "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
+ "language" => ["type" => "text", "comment" => "Language information about this post"],
+ "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
+ "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
+ "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
+ "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
+ "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
+ "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
+ "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"],
+ "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams verb"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uri-plink-hash" => ["UNIQUE", "uri-plink-hash"],
+ "uri" => ["uri(191)"],
+ "uri-id" => ["uri-id"]
+ ]
+ ],
+ "item-delivery-data" => [
+ "comment" => "Delivery data for items",
+ "fields" => [
+ "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
+ "postopts" => ["type" => "text", "comment" => "External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery"],
+ "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["iid"],
+ ]
+ ],
+ "item-uri" => [
+ "comment" => "URI and GUID for items",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
+ "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
+ "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uri" => ["UNIQUE", "uri"],
+ "guid" => ["guid"]
+ ]
+ ],
+ "locks" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
+ "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
+ "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "name_expires" => ["name", "expires"]
+ ]
+ ],
+ "mail" => [
+ "comment" => "private messages",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
+ "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
+ "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
+ "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
+ "contact-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "relation" => ["contact" => "id"], "comment" => "contact.id"],
+ "convid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["conv" => "id"], "comment" => "conv.id"],
+ "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "body" => ["type" => "mediumtext", "comment" => ""],
+ "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
+ "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
+ "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_seen" => ["uid", "seen"],
+ "convid" => ["convid"],
+ "uri" => ["uri(64)"],
+ "parent-uri" => ["parent-uri(64)"],
+ "contactid" => ["contact-id(32)"],
+ ]
+ ],
+ "mailacct" => [
+ "comment" => "Mail account data for fetching mails",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
+ "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "pass" => ["type" => "text", "comment" => ""],
+ "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "manage" => [
+ "comment" => "table of accounts that can manage each other",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_mid" => ["UNIQUE", "uid", "mid"],
+ ]
+ ],
+ "notify" => [
+ "comment" => "notifications",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
+ "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "msg" => ["type" => "mediumtext", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id"],
+ "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+ "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
+ "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
+ "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
+ "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "hash_uid" => ["hash", "uid"],
+ "seen_uid_date" => ["seen", "uid", "date"],
+ "uid_date" => ["uid", "date"],
+ "uid_type_link" => ["uid", "type", "link(190)"],
+ ]
+ ],
+ "notify-threads" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["notify" => "id"], "comment" => ""],
+ "master-parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"],
+ "comment" => ""],
+ "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
+ "comment" => "User id"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "oembed" => [
+ "comment" => "cache for OEmbed queries",
+ "fields" => [
+ "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
+ "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
+ "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["url", "maxwidth"],
+ "created" => ["created"],
+ ]
+ ],
+ "openwebauth-token" => [
+ "comment" => "Store OpenWebAuth token to verify contacts",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
+ "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
+ "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "parsed_url" => [
+ "comment" => "cache for 'parse_url' queries",
+ "fields" => [
+ "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
+ "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
+ "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
+ "content" => ["type" => "mediumtext", "comment" => "page data"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["url", "guessing", "oembed"],
+ "created" => ["created"],
+ ]
+ ],
+ "participation" => [
+ "comment" => "Storage for participation messages from Diaspora",
+ "fields" => [
+ "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => ""],
+ "server" => ["type" => "varchar(60)", "not null" => "1", "primary" => "1", "comment" => ""],
+ "cid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["contact" => "id"], "comment" => ""],
+ "fid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["fcontact" => "id"], "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["iid", "server"]
+ ]
+ ],
+ "pconfig" => [
+ "comment" => "personal (per user) configuration storage",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
+ "k" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => ""],
+ "v" => ["type" => "mediumtext", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
+ ]
+ ],
+ "permissionset" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
+ "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
+ "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+ "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+ "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
+ ]
+ ],
+ "photo" => [
+ "comment" => "photo storage",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
+ "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
+ "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
+ "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
+ "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "desc" => ["type" => "text", "comment" => ""],
+ "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
+ "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
+ "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
+ "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
+ "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
+ "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
+ "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "contactid" => ["contact-id"],
+ "uid_contactid" => ["uid", "contact-id"],
+ "uid_profile" => ["uid", "profile"],
+ "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
+ "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
+ "resource-id" => ["resource-id"],
+ ]
+ ],
+ "poll" => [
+ "comment" => "Currently unused table for storing poll results",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "q0" => ["type" => "text", "comment" => ""],
+ "q1" => ["type" => "text", "comment" => ""],
+ "q2" => ["type" => "text", "comment" => ""],
+ "q3" => ["type" => "text", "comment" => ""],
+ "q4" => ["type" => "text", "comment" => ""],
+ "q5" => ["type" => "text", "comment" => ""],
+ "q6" => ["type" => "text", "comment" => ""],
+ "q7" => ["type" => "text", "comment" => ""],
+ "q8" => ["type" => "text", "comment" => ""],
+ "q9" => ["type" => "text", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid" => ["uid"],
+ ]
+ ],
+ "poll_result" => [
+ "comment" => "data for polls - currently unused",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "poll_id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["poll" => "id"]],
+ "choice" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "poll_id" => ["poll_id"],
+ ]
+ ],
+ "process" => [
+ "comment" => "Currently running system processes",
+ "fields" => [
+ "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""],
+ "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["pid"],
+ "command" => ["command"],
+ ]
+ ],
+ "profile" => [
+ "comment" => "user profiles data",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
+ "profile-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name of the profile"],
+ "is-default" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Mark this profile as default profile"],
+ "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
+ "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Title or description"],
+ "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
+ "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "hometown" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+ "marital" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "with" => ["type" => "text", "comment" => ""],
+ "howlong" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "sexual" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "politic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "religion" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "pub_keywords" => ["type" => "text", "comment" => ""],
+ "prv_keywords" => ["type" => "text", "comment" => ""],
+ "likes" => ["type" => "text", "comment" => ""],
+ "dislikes" => ["type" => "text", "comment" => ""],
+ "about" => ["type" => "text", "comment" => ""],
+ "summary" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "music" => ["type" => "text", "comment" => ""],
+ "book" => ["type" => "text", "comment" => ""],
+ "tv" => ["type" => "text", "comment" => ""],
+ "film" => ["type" => "text", "comment" => ""],
+ "interest" => ["type" => "text", "comment" => ""],
+ "romance" => ["type" => "text", "comment" => ""],
+ "work" => ["type" => "text", "comment" => ""],
+ "education" => ["type" => "text", "comment" => ""],
+ "contact" => ["type" => "text", "comment" => ""],
+ "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
+ "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid_is-default" => ["uid", "is-default"],
+ ]
+ ],
+ "profile_check" => [
+ "comment" => "DFRN remote auth use",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
+ "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "push_subscriber" => [
+ "comment" => "Used for OStatus: Contains feed subscribers",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
+ "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
+ "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
+ "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
+ "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "next_try" => ["next_try"],
+ ]
+ ],
+ "queue" => [
+ "comment" => "Queue for messages that couldn't be delivered",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Message receiver"],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Receiver's network"],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Unique GUID of the message"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date, when the message was created"],
+ "last" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last trial"],
+ "next" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
+ "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
+ "content" => ["type" => "mediumtext", "comment" => ""],
+ "batch" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "last" => ["last"],
+ "next" => ["next"],
+ ]
+ ],
+ "register" => [
+ "comment" => "registrations requiring admin approval",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
+ "note" => ["type" => "text", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "search" => [
+ "comment" => "",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "uid" => ["uid"],
+ ]
+ ],
+ "session" => [
+ "comment" => "web session storage",
+ "fields" => [
+ "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "data" => ["type" => "text", "comment" => ""],
+ "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "sid" => ["sid(64)"],
+ "expire" => ["expire"],
+ ]
+ ],
+ "sign" => [
+ "comment" => "Diaspora signatures",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id"],
+ "signed_text" => ["type" => "mediumtext", "comment" => ""],
+ "signature" => ["type" => "text", "comment" => ""],
+ "signer" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "iid" => ["UNIQUE", "iid"],
+ ]
+ ],
+ "term" => [
+ "comment" => "item taxonomy (categories, tags, etc.) table",
+ "fields" => [
+ "tid" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+ "oid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+ "otype" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["tid"],
+ "oid_otype_type_term" => ["oid", "otype", "type", "term(32)"],
+ "uid_otype_type_term_global_created" => ["uid", "otype", "type", "term(32)", "global", "created"],
+ "uid_otype_type_url" => ["uid", "otype", "type", "url(64)"],
+ "guid" => ["guid(64)"],
+ ]
+ ],
+ "thread" => [
+ "comment" => "Thread related data",
+ "fields" => [
+ "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"],
+ "comment" => "sequential ID"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+ "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item owner"],
+ "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item author"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
+ "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
+ "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+ "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
+ "bookmark" => ["type" => "boolean", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["iid"],
+ "uid_network_commented" => ["uid", "network", "commented"],
+ "uid_network_created" => ["uid", "network", "created"],
+ "uid_contactid_commented" => ["uid", "contact-id", "commented"],
+ "uid_contactid_created" => ["uid", "contact-id", "created"],
+ "contactid" => ["contact-id"],
+ "ownerid" => ["owner-id"],
+ "authorid" => ["author-id"],
+ "uid_created" => ["uid", "created"],
+ "uid_commented" => ["uid", "commented"],
+ "uid_wall_created" => ["uid", "wall", "created"],
+ "private_wall_origin_commented" => ["private", "wall", "origin", "commented"],
+ ]
+ ],
+ "tokens" => [
+ "comment" => "OAuth usage",
+ "fields" => [
+ "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
+ "secret" => ["type" => "text", "comment" => ""],
+ "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => ["clients" => "client_id"]],
+ "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+ "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ ]
+ ],
+ "user" => [
+ "comment" => "The local users",
+ "fields" => [
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "parent-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
+ "comment" => "The parent user that has full control about this user"],
+ "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
+ "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
+ "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
+ "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
+ "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
+ "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
+ "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+ "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
+ "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
+ "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
+ "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
+ "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
+ "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
+ "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
+ "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
+ "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
+ "spubkey" => ["type" => "text", "comment" => ""],
+ "sprvkey" => ["type" => "text", "comment" => ""],
+ "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
+ "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
+ "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
+ "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
+ "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
+ "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
+ "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
+ "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
+ "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
+ "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
+ "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
+ "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
+ "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
+ "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+ "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
+ "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
+ "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+ "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+ "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+ "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+ "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
+ "openidserver" => ["type" => "text", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uid"],
+ "nickname" => ["nickname(32)"],
+ ]
+ ],
+ "userd" => [
+ "comment" => "Deleted usernames",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
+ "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "username" => ["username(32)"],
+ ]
+ ],
+ "user-contact" => [
+ "comment" => "User specific public contact data",
+ "fields" => [
+ "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
+ "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
+ "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uid", "cid"]
+ ]
+ ],
+ "user-item" => [
+ "comment" => "User specific item data",
+ "fields" => [
+ "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
+ "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
+ "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide an item from the user"],
+ "ignored" => ["type" => "boolean", "comment" => "Ignore this thread if set"]
+ ],
+ "indexes" => [
+ "PRIMARY" => ["uid", "iid"]
+ ]
+ ],
+ "worker-ipc" => [
+ "comment" => "Inter process communication between the frontend and the worker",
+ "fields" => [
+ "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
+ "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["key"],
+ ],
+ "engine" => "MEMORY",
+ ],
+ "workerqueue" => [
+ "comment" => "Background tasks queue entries",
+ "fields" => [
+ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
+ "parameter" => ["type" => "mediumblob", "comment" => "Task command"],
+ "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
+ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
+ "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
+ "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
+ "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
+ "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
+ "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
+ ],
+ "indexes" => [
+ "PRIMARY" => ["id"],
+ "pid" => ["pid"],
+ "parameter" => ["parameter(64)"],
+ "priority_created_next_try" => ["priority", "created", "next_try"],
+ "done_priority_executed_next_try" => ["done", "priority", "executed", "next_try"],
+ "done_executed_next_try" => ["done", "executed", "next_try"],
+ "done_priority_next_try" => ["done", "priority", "next_try"],
+ "done_next_try" => ["done", "next_try"]
+ ]
+ ]
+];
+++ /dev/null
-<?php
-
-/* Main database structure configuration file.
- *
- * Here are described all the tables, fields and indexes Friendica needs to work.
- *
- * Syntax (braces indicate optionale values):
- * "<table name>" => [
- * "comment" => "Description of the table",
- * "fields" => [
- * "<field name>" => [
- * "type" => "<field type>{(<field size>)} <unsigned>",
- * "not null" => 0|1,
- * {"extra" => "auto_increment",}
- * {"default" => "<default value>",}
- * {"default" => NULL_DATE,} (for datetime fields)
- * {"primary" => "1",}
- * {"relation" => ["<foreign key table name>" => "<foreign key field name>"],}
- * "comment" => "Description of the fields"
- * ],
- * ...
- * ],
- * "indexes" => [
- * "PRIMARY" => ["<primary key field name>", ...],
- * "<index name>" => [{"UNIQUE",} "<field name>{(<key size>)}", ...]
- * ...
- * ],
- * ],
- *
- * If you need to make any change, make sure to increment the DB_UPDATE_VERSION constant value below.
- *
- */
-
-use Friendica\Database\DBA;
-
-if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1290);
-}
-
-return [
- "addon" => [
- "comment" => "registered addons",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "name" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "addon base (file)name"],
- "version" => ["type" => "varchar(50)", "not null" => "1", "default" => "", "comment" => "currently unused"],
- "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently always 1"],
- "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "currently unused"],
- "timestamp" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "file timestamp to check for reloads"],
- "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = has admin config, 0 = has no admin config"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "name" => ["UNIQUE", "name"],
- ]
- ],
- "apcontact" => [
- "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation",
- "fields" => [
- "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "URL of the contact"],
- "uuid" => ["type" => "varchar(255)", "comment" => ""],
- "type" => ["type" => "varchar(20)", "not null" => "1", "comment" => ""],
- "following" => ["type" => "varchar(255)", "comment" => ""],
- "followers" => ["type" => "varchar(255)", "comment" => ""],
- "inbox" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
- "outbox" => ["type" => "varchar(255)", "comment" => ""],
- "sharedinbox" => ["type" => "varchar(255)", "comment" => ""],
- "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "name" => ["type" => "varchar(255)", "comment" => ""],
- "about" => ["type" => "text", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "comment" => ""],
- "addr" => ["type" => "varchar(255)", "comment" => ""],
- "alias" => ["type" => "varchar(255)", "comment" => ""],
- "pubkey" => ["type" => "text", "comment" => ""],
- "baseurl" => ["type" => "varchar(255)", "comment" => "baseurl of the ap contact"],
- "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""]
- ],
- "indexes" => [
- "PRIMARY" => ["url"],
- "addr" => ["addr(32)"],
- "alias" => ["alias(190)"],
- "url" => ["followers(190)"]
- ]
- ],
- "attach" => [
- "comment" => "file attachments",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "generated index"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "hash"],
- "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "filename of original"],
- "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "mimetype"],
- "filesize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "size in bytes"],
- "data" => ["type" => "longblob", "not null" => "1", "comment" => "file data"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
- "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
- "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"],
- "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
- "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
- "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "auth_codes" => [
- "comment" => "OAuth usage",
- "fields" => [
- "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
- "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => ["clients" => "client_id"],
- "comment" => ""],
- "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
- "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
- "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "cache" => [
- "comment" => "Stores temporary data",
- "fields" => [
- "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "cache key"],
- "v" => ["type" => "mediumtext", "comment" => "cached serialized value"],
- "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
- "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache insertion"],
- ],
- "indexes" => [
- "PRIMARY" => ["k"],
- "k_expires" => ["k", "expires"],
- ]
- ],
- "challenge" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "clients" => [
- "comment" => "OAuth usage",
- "fields" => [
- "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
- "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
- "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
- "name" => ["type" => "text", "comment" => ""],
- "icon" => ["type" => "text", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- ],
- "indexes" => [
- "PRIMARY" => ["client_id"],
- ]
- ],
- "config" => [
- "comment" => "main configuration storage",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
- "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
- "v" => ["type" => "mediumtext", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "cat_k" => ["UNIQUE", "cat", "k"],
- ]
- ],
- "contact" => [
- "comment" => "contact table",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if the contact is the user him/her self"],
- "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "rel" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "The kind of the relation between the user and the contact"],
- "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network protocol of the contact"],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
- "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
- "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "about" => ["type" => "text", "comment" => ""],
- "keywords" => ["type" => "text", "comment" => "public keywords (interests) of the contact"],
- "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
- "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo of the contact"],
- "thumb" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (thumb size)"],
- "micro" => ["type" => "varchar(255)", "default" => "", "comment" => "Link to the profile photo (micro size)"],
- "site-pubkey" => ["type" => "text", "comment" => ""],
- "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
- "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
- "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "request" => ["type" => "varchar(255)", "comment" => ""],
- "notify" => ["type" => "varchar(255)", "comment" => ""],
- "poll" => ["type" => "varchar(255)", "comment" => ""],
- "confirm" => ["type" => "varchar(255)", "comment" => ""],
- "poco" => ["type" => "varchar(255)", "comment" => ""],
- "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "last-update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last try to update the contact info"],
- "success_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last successful contact update"],
- "failure_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of the last failed update"],
- "name-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "uri-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "term-date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last-item" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "date of the last post"],
- "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
- "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "posts of the contact are readonly"],
- "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a forum"],
- "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "contact is a private group"],
- "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
- "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
- "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Contact has been deleted"],
- "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
- "reason" => ["type" => "text", "comment" => ""],
- "closeness" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "99", "comment" => ""],
- "info" => ["type" => "mediumtext", "comment" => ""],
- "profile-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
- "bd" => ["type" => "date", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
- "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "fetch_further_information" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "ffi_keyword_blacklist" => ["type" => "text", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_name" => ["uid", "name(190)"],
- "self_uid" => ["self", "uid"],
- "alias_uid" => ["alias(32)", "uid"],
- "pending_uid" => ["pending", "uid"],
- "blocked_uid" => ["blocked", "uid"],
- "uid_rel_network_poll" => ["uid", "rel", "network", "poll(64)", "archive"],
- "uid_network_batch" => ["uid", "network", "batch(64)"],
- "addr_uid" => ["addr(32)", "uid"],
- "nurl_uid" => ["nurl(32)", "uid"],
- "nick_uid" => ["nick(32)", "uid"],
- "dfrn-id" => ["dfrn-id(64)"],
- "issued-id" => ["issued-id(64)"],
- ]
- ],
- "conv" => [
- "comment" => "private messages",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this conversation"],
- "recips" => ["type" => "text", "comment" => "sender_handle;recipient_handle"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "handle of creator"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation timestamp"],
- "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "edited timestamp"],
- "subject" => ["type" => "text", "comment" => "subject of initial message"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid" => ["uid"],
- ]
- ],
- "conversation" => [
- "comment" => "Raw data and structure information for messages",
- "fields" => [
- "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "Original URI of the item - unrelated to the table with the same name"],
- "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "URI to which this item is a reply"],
- "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation URI"],
- "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => "GNU Social conversation link"],
- "protocol" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "255", "comment" => "The protocol of the item"],
- "source" => ["type" => "mediumtext", "comment" => "Original source"],
- "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Receiving date"],
- ],
- "indexes" => [
- "PRIMARY" => ["item-uri"],
- "conversation-uri" => ["conversation-uri"],
- "received" => ["received"],
- ]
- ],
- "diaspora-interaction" => [
- "comment" => "Signed Diaspora Interaction",
- "fields" => [
- "uri-id" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
- "interaction" => ["type" => "mediumtext", "comment" => "The Diaspora interaction"]
- ],
- "indexes" => [
- "PRIMARY" => ["uri-id"]
- ]
- ],
- "event" => [
- "comment" => "Events",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact_id (ID of the contact in contact table)"],
- "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"],
- "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"],
- "start" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event start time"],
- "finish" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "event end time"],
- "summary" => ["type" => "text", "comment" => "short description or title of the event"],
- "desc" => ["type" => "text", "comment" => "event description"],
- "location" => ["type" => "text", "comment" => "event location"],
- "type" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => "event or birthday"],
- "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"],
- "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "adjust to timezone of the recipient (0 or 1)"],
- "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"],
- "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
- "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
- "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
- "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_start" => ["uid", "start"],
- ]
- ],
- "fcontact" => [
- "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "unique id"],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
- "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "pubkey" => ["type" => "text", "comment" => ""],
- "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "addr" => ["addr(32)"],
- "url" => ["UNIQUE", "url(190)"],
- ]
- ],
- "fsuggest" => [
- "comment" => "friend suggestion stuff",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "note" => ["type" => "text", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "gcign" => [
- "comment" => "contacts ignored by friend suggestions",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Local User id"],
- "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => "gcontact.id of ignored contact"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid" => ["uid"],
- "gcid" => ["gcid"],
- ]
- ],
- "gcontact" => [
- "comment" => "global contacts",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this contact is known by"],
- "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Nick- and user name of the contact"],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Link to the contacts profile page"],
- "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Link to the profile photo"],
- "connect" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "updated" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "about" => ["type" => "text", "comment" => ""],
- "keywords" => ["type" => "text", "comment" => "puplic keywords (interests)"],
- "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
- "birthday" => ["type" => "varchar(32)", "not null" => "1", "default" => DBA::NULL_DATE, "comment" => ""],
- "community" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 if contact is forum account"],
- "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""],
- "hide" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = should be hidden from search"],
- "nsfw" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 = contact posts nsfw content"],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "social network protocol"],
- "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "notify" => ["type" => "varchar(255)", "comment" => ""],
- "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "generation" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "server_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "baseurl of the contacts server"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "nurl" => ["UNIQUE", "nurl(190)"],
- "name" => ["name(64)"],
- "nick" => ["nick(32)"],
- "addr" => ["addr(64)"],
- "hide_network_updated" => ["hide", "network", "updated"],
- "updated" => ["updated"],
- ]
- ],
- "glink" => [
- "comment" => "'friends of friends' linkages derived from poco",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "gcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
- "zcid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
- "updated" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "cid_uid_gcid_zcid" => ["UNIQUE", "cid", "uid", "gcid", "zcid"],
- "gcid" => ["gcid"],
- ]
- ],
- "group" => [
- "comment" => "privacy groups, group info",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"],
- "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid" => ["uid"],
- ]
- ],
- "group_member" => [
- "comment" => "privacy groups, member info",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["group" => "id"], "comment" => "groups.id of the associated group"],
- "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "contactid" => ["contact-id"],
- "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
- ]
- ],
- "gserver" => [
- "comment" => "Global servers",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "info" => ["type" => "text", "comment" => ""],
- "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
- "registered-users" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Number of registered users"],
- "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
- "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "relay-subscribe" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Has the server subscribed to the relay system"],
- "relay-scope" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => "The scope of messages that the server wants to get"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_poco_query" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_contact" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "last_failure" => ["type" => "datetime", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "nurl" => ["UNIQUE", "nurl(190)"],
- ]
- ],
- "gserver-tag" => [
- "comment" => "Tags that the server has subscribed",
- "fields" => [
- "gserver-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["gserver" => "id"], "primary" => "1",
- "comment" => "The id of the gserver"],
- "tag" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "primary" => "1", "comment" => "Tag that the server has subscribed"],
- ],
- "indexes" => [
- "PRIMARY" => ["gserver-id", "tag"],
- "tag" => ["tag"],
- ]
- ],
- "hook" => [
- "comment" => "addon hook registry",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "hook" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => "name of hook"],
- "file" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "relative filename of hook handler"],
- "function" => ["type" => "varbinary(200)", "not null" => "1", "default" => "", "comment" => "function name of hook handler"],
- "priority" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => "not yet implemented - can be used to sort conflicts in hook handling by calling handlers in priority order"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "hook_file_function" => ["UNIQUE", "hook", "file", "function"],
- ]
- ],
- "intro" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "fid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["fcontact" => "id"], "comment" => ""],
- "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
- "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "note" => ["type" => "text", "comment" => ""],
- "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "datetime" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
- "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "item" => [
- "comment" => "Structure for all posts",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this item"],
- "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
- "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
- "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item"],
- "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "uri of the parent to this item"],
- "parent-uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the parent uri"],
- "thr-parent" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri"],
- "thr-parent-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the thread parent uri"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation timestamp."],
- "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last edit (default is created)"],
- "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last comment/reply to this item"],
- "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime"],
- "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date that something in the conversation changed, indicating clients should fetch the conversation again"],
- "gravity" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Network from where the item comes from"],
- "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the owner of this item"],
- "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Link to the contact table with uid=0 of the author of this item"],
- "icid" => ["type" => "int unsigned", "relation" => ["item-content" => "id"], "comment" => "Id of the item-content table entry that contains the whole item content"],
- "iaid" => ["type" => "int unsigned", "relation" => ["item-activity" => "id"], "comment" => "Id of the item-activity table entry that contains the activity data"],
- "extid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
- "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "distribution is restricted"],
- "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been deleted"],
- // User specific fields. Eventually they will move to user-item
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id which owns this copy of the item"],
- "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
- "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "This item was posted to the wall of uid"],
- "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item originated at this site"],
- "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "item has been favourited"],
- "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => "item has not been seen"],
- "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "The owner of this item was mentioned in it"],
- "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "psid" => ["type" => "int unsigned", "relation" => ["permissionset" => "id"], "comment" => "ID of the permission set of this post"],
- // It has to be decided whether these fields belong to the user or the structure
- "resource-id" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type"],
- "event-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => "Used to link to the event.id"],
- // Could possibly be replaced by the "attach" table?
- "attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
- // Deprecated fields. Will be removed in upcoming versions
- "allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "deny_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "postopts" => ["type" => "text", "comment" => "Deprecated"],
- "inform" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "type" => ["type" => "varchar(20)", "comment" => "Deprecated"],
- "bookmark" => ["type" => "boolean", "comment" => "Deprecated"],
- "file" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "location" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "coord" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "tag" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "plink" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "title" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "content-warning" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "body" => ["type" => "mediumtext", "comment" => "Deprecated"],
- "app" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "verb" => ["type" => "varchar(100)", "comment" => "Deprecated"],
- "object-type" => ["type" => "varchar(100)", "comment" => "Deprecated"],
- "object" => ["type" => "text", "comment" => "Deprecated"],
- "target-type" => ["type" => "varchar(100)", "comment" => "Deprecated"],
- "target" => ["type" => "text", "comment" => "Deprecated"],
- "author-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "author-link" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "author-avatar" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "owner-name" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "owner-link" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "owner-avatar" => ["type" => "varchar(255)", "comment" => "Deprecated"],
- "rendered-hash" => ["type" => "varchar(32)", "comment" => "Deprecated"],
- "rendered-html" => ["type" => "mediumtext", "comment" => "Deprecated"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "guid" => ["guid(191)"],
- "uri" => ["uri(191)"],
- "parent" => ["parent"],
- "parent-uri" => ["parent-uri(191)"],
- "extid" => ["extid(191)"],
- "uid_id" => ["uid", "id"],
- "uid_contactid_id" => ["uid", "contact-id", "id"],
- "uid_created" => ["uid", "created"],
- "uid_commented" => ["uid", "commented"],
- "uid_unseen_contactid" => ["uid", "unseen", "contact-id"],
- "uid_network_received" => ["uid", "network", "received"],
- "uid_network_commented" => ["uid", "network", "commented"],
- "uid_thrparent" => ["uid", "thr-parent(190)"],
- "uid_parenturi" => ["uid", "parent-uri(190)"],
- "uid_contactid_created" => ["uid", "contact-id", "created"],
- "authorid_created" => ["author-id", "created"],
- "ownerid" => ["owner-id"],
- "uid_uri" => ["uid", "uri(190)"],
- "resource-id" => ["resource-id"],
- "deleted_changed" => ["deleted", "changed"],
- "uid_wall_changed" => ["uid", "wall", "changed"],
- "uid_eventid" => ["uid", "event-id"],
- "icid" => ["icid"],
- "iaid" => ["iaid"],
- "psid_wall" => ["psid", "wall"],
- ]
- ],
- "item-activity" => [
- "comment" => "Activities for items",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
- "uri" => ["type" => "varchar(255)", "comment" => ""],
- "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
- "uri-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
- "activity" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""]
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uri-hash" => ["UNIQUE", "uri-hash"],
- "uri" => ["uri(191)"],
- "uri-id" => ["uri-id"]
- ]
- ],
- "item-content" => [
- "comment" => "Content for all posts",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
- "uri" => ["type" => "varchar(255)", "comment" => ""],
- "uri-id" => ["type" => "int unsigned", "relation" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"],
- "uri-plink-hash" => ["type" => "varchar(80)", "not null" => "1", "default" => "", "comment" => "RIPEMD-128 hash from uri"],
- "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "item title"],
- "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "body" => ["type" => "mediumtext", "comment" => "item body content"],
- "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"],
- "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"],
- "language" => ["type" => "text", "comment" => "Language information about this post"],
- "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "application which generated this item"],
- "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
- "rendered-html" => ["type" => "mediumtext", "comment" => "item.body converted to html"],
- "object-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams object type"],
- "object" => ["type" => "text", "comment" => "JSON encoded object structure unless it is an implied object (normal post)"],
- "target-type" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams target type if applicable (URI)"],
- "target" => ["type" => "text", "comment" => "JSON encoded target structure if used"],
- "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "permalink or URL to a displayable copy of the message at its source"],
- "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => "ActivityStreams verb"]
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uri-plink-hash" => ["UNIQUE", "uri-plink-hash"],
- "uri" => ["uri(191)"],
- "uri-id" => ["uri-id"]
- ]
- ],
- "item-delivery-data" => [
- "comment" => "Delivery data for items",
- "fields" => [
- "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
- "postopts" => ["type" => "text", "comment" => "External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery"],
- "inform" => ["type" => "mediumtext", "comment" => "Additional receivers of the linked item"],
- ],
- "indexes" => [
- "PRIMARY" => ["iid"],
- ]
- ],
- "item-uri" => [
- "comment" => "URI and GUID for items",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"],
- "uri" => ["type" => "varbinary(255)", "not null" => "1", "comment" => "URI of an item"],
- "guid" => ["type" => "varbinary(255)", "comment" => "A unique identifier for an item"]
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uri" => ["UNIQUE", "uri"],
- "guid" => ["guid"]
- ]
- ],
- "locks" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
- "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process ID"],
- "expires" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of cache expiration"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "name_expires" => ["name", "expires"]
- ]
- ],
- "mail" => [
- "comment" => "private messages",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this private message"],
- "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "name of the sender"],
- "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "contact photo link of the sender"],
- "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "profile linke of the sender"],
- "contact-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "relation" => ["contact" => "id"], "comment" => "contact.id"],
- "convid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["conv" => "id"], "comment" => "conv.id"],
- "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "body" => ["type" => "mediumtext", "comment" => ""],
- "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if message visited it is 1"],
- "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if sender not in the contact table this is 1"],
- "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time of the private message"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_seen" => ["uid", "seen"],
- "convid" => ["convid"],
- "uri" => ["uri(64)"],
- "parent-uri" => ["parent-uri(64)"],
- "contactid" => ["contact-id(32)"],
- ]
- ],
- "mailacct" => [
- "comment" => "Mail account data for fetching mails",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
- "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "pass" => ["type" => "text", "comment" => ""],
- "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "action" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "last_check" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "manage" => [
- "comment" => "table of accounts that can manage each other",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "mid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_mid" => ["UNIQUE", "uid", "mid"],
- ]
- ],
- "notify" => [
- "comment" => "notifications",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
- "type" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "msg" => ["type" => "mediumtext", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id"],
- "parent" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
- "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "verb" => ["type" => "varchar(100)", "not null" => "1", "default" => "", "comment" => ""],
- "otype" => ["type" => "varchar(10)", "not null" => "1", "default" => "", "comment" => ""],
- "name_cache" => ["type" => "tinytext", "comment" => "Cached bbcode parsing of name"],
- "msg_cache" => ["type" => "mediumtext", "comment" => "Cached bbcode parsing of msg"]
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "hash_uid" => ["hash", "uid"],
- "seen_uid_date" => ["seen", "uid", "date"],
- "uid_date" => ["uid", "date"],
- "uid_type_link" => ["uid", "type", "link(190)"],
- ]
- ],
- "notify-threads" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "notify-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["notify" => "id"], "comment" => ""],
- "master-parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"],
- "comment" => ""],
- "parent-item" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "receiver-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
- "comment" => "User id"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "oembed" => [
- "comment" => "cache for OEmbed queries",
- "fields" => [
- "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
- "maxwidth" => ["type" => "mediumint unsigned", "not null" => "1", "primary" => "1", "comment" => "Maximum width passed to Oembed"],
- "content" => ["type" => "mediumtext", "comment" => "OEmbed data of the page"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
- ],
- "indexes" => [
- "PRIMARY" => ["url", "maxwidth"],
- "created" => ["created"],
- ]
- ],
- "openwebauth-token" => [
- "comment" => "Store OpenWebAuth token to verify contacts",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "type" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Verify type"],
- "token" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "A generated token"],
- "meta" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "parsed_url" => [
- "comment" => "cache for 'parse_url' queries",
- "fields" => [
- "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => "page url"],
- "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the 'guessing' mode active?"],
- "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => "is the data the result of oembed?"],
- "content" => ["type" => "mediumtext", "comment" => "page data"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "datetime of creation"],
- ],
- "indexes" => [
- "PRIMARY" => ["url", "guessing", "oembed"],
- "created" => ["created"],
- ]
- ],
- "participation" => [
- "comment" => "Storage for participation messages from Diaspora",
- "fields" => [
- "iid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => ""],
- "server" => ["type" => "varchar(60)", "not null" => "1", "primary" => "1", "comment" => ""],
- "cid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["contact" => "id"], "comment" => ""],
- "fid" => ["type" => "int unsigned", "not null" => "1", "relation" => ["fcontact" => "id"], "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["iid", "server"]
- ]
- ],
- "pconfig" => [
- "comment" => "personal (per user) configuration storage",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => ""],
- "k" => ["type" => "varbinary(100)", "not null" => "1", "default" => "", "comment" => ""],
- "v" => ["type" => "mediumtext", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
- ]
- ],
- "permissionset" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner id of this permission set"],
- "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
- "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
- "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
- "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_allow_cid_allow_gid_deny_cid_deny_gid" => ["allow_cid(50)", "allow_gid(30)", "deny_cid(50)", "deny_gid(30)"],
- ]
- ],
- "photo" => [
- "comment" => "photo storage",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
- "guid" => ["type" => "char(16)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this photo"],
- "resource-id" => ["type" => "char(32)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation date"],
- "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edited date"],
- "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "desc" => ["type" => "text", "comment" => ""],
- "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "The name of the album to which the photo belongs"],
- "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "type" => ["type" => "varchar(30)", "not null" => "1", "default" => "image/jpeg"],
- "height" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "width" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "datasize" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
- "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"],
- "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"],
- "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"],
- "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "contactid" => ["contact-id"],
- "uid_contactid" => ["uid", "contact-id"],
- "uid_profile" => ["uid", "profile"],
- "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
- "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id", "created"],
- "resource-id" => ["resource-id"],
- ]
- ],
- "poll" => [
- "comment" => "Currently unused table for storing poll results",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "q0" => ["type" => "text", "comment" => ""],
- "q1" => ["type" => "text", "comment" => ""],
- "q2" => ["type" => "text", "comment" => ""],
- "q3" => ["type" => "text", "comment" => ""],
- "q4" => ["type" => "text", "comment" => ""],
- "q5" => ["type" => "text", "comment" => ""],
- "q6" => ["type" => "text", "comment" => ""],
- "q7" => ["type" => "text", "comment" => ""],
- "q8" => ["type" => "text", "comment" => ""],
- "q9" => ["type" => "text", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid" => ["uid"],
- ]
- ],
- "poll_result" => [
- "comment" => "data for polls - currently unused",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "poll_id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["poll" => "id"]],
- "choice" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "poll_id" => ["poll_id"],
- ]
- ],
- "process" => [
- "comment" => "Currently running system processes",
- "fields" => [
- "pid" => ["type" => "int unsigned", "not null" => "1", "primary" => "1", "comment" => ""],
- "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["pid"],
- "command" => ["command"],
- ]
- ],
- "profile" => [
- "comment" => "user profiles data",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "Owner User id"],
- "profile-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name of the profile"],
- "is-default" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Mark this profile as default profile"],
- "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"],
- "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Title or description"],
- "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"],
- "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
- "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "hometown" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
- "marital" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "with" => ["type" => "text", "comment" => ""],
- "howlong" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "sexual" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "politic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "religion" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "pub_keywords" => ["type" => "text", "comment" => ""],
- "prv_keywords" => ["type" => "text", "comment" => ""],
- "likes" => ["type" => "text", "comment" => ""],
- "dislikes" => ["type" => "text", "comment" => ""],
- "about" => ["type" => "text", "comment" => ""],
- "summary" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "music" => ["type" => "text", "comment" => ""],
- "book" => ["type" => "text", "comment" => ""],
- "tv" => ["type" => "text", "comment" => ""],
- "film" => ["type" => "text", "comment" => ""],
- "interest" => ["type" => "text", "comment" => ""],
- "romance" => ["type" => "text", "comment" => ""],
- "work" => ["type" => "text", "comment" => ""],
- "education" => ["type" => "text", "comment" => ""],
- "contact" => ["type" => "text", "comment" => ""],
- "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish default profile in local directory"],
- "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "publish profile in global directory"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid_is-default" => ["uid", "is-default"],
- ]
- ],
- "profile_check" => [
- "comment" => "DFRN remote auth use",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "contact.id"],
- "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "push_subscriber" => [
- "comment" => "Used for OStatus: Contains feed subscribers",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
- "last_update" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last successful trial"],
- "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
- "renewed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last subscription renewal"],
- "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "next_try" => ["next_try"],
- ]
- ],
- "queue" => [
- "comment" => "Queue for messages that couldn't be delivered",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Message receiver"],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => "Receiver's network"],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Unique GUID of the message"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date, when the message was created"],
- "last" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Date of last trial"],
- "next" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
- "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
- "content" => ["type" => "mediumtext", "comment" => ""],
- "batch" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "last" => ["last"],
- "next" => ["next"],
- ]
- ],
- "register" => [
- "comment" => "registrations requiring admin approval",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
- "note" => ["type" => "text", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "search" => [
- "comment" => "",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "uid" => ["uid"],
- ]
- ],
- "session" => [
- "comment" => "web session storage",
- "fields" => [
- "id" => ["type" => "bigint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
- "data" => ["type" => "text", "comment" => ""],
- "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "sid" => ["sid(64)"],
- "expire" => ["expire"],
- ]
- ],
- "sign" => [
- "comment" => "Diaspora signatures",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => "item.id"],
- "signed_text" => ["type" => "mediumtext", "comment" => ""],
- "signature" => ["type" => "text", "comment" => ""],
- "signer" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "iid" => ["UNIQUE", "iid"],
- ]
- ],
- "term" => [
- "comment" => "item taxonomy (categories, tags, etc.) table",
- "fields" => [
- "tid" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
- "oid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
- "otype" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- ],
- "indexes" => [
- "PRIMARY" => ["tid"],
- "oid_otype_type_term" => ["oid", "otype", "type", "term(32)"],
- "uid_otype_type_term_global_created" => ["uid", "otype", "type", "term(32)", "global", "created"],
- "uid_otype_type_url" => ["uid", "otype", "type", "url(64)"],
- "guid" => ["guid(64)"],
- ]
- ],
- "thread" => [
- "comment" => "Thread related data",
- "fields" => [
- "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"],
- "comment" => "sequential ID"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
- "owner-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item owner"],
- "author-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => "Item author"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "commented" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "received" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "changed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => ""],
- "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "post-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Post type (personal note, bookmark, ...)"],
- "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
- "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "forum_mode" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "network" => ["type" => "char(4)", "not null" => "1", "default" => "", "comment" => ""],
- "bookmark" => ["type" => "boolean", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["iid"],
- "uid_network_commented" => ["uid", "network", "commented"],
- "uid_network_created" => ["uid", "network", "created"],
- "uid_contactid_commented" => ["uid", "contact-id", "commented"],
- "uid_contactid_created" => ["uid", "contact-id", "created"],
- "contactid" => ["contact-id"],
- "ownerid" => ["owner-id"],
- "authorid" => ["author-id"],
- "uid_created" => ["uid", "created"],
- "uid_commented" => ["uid", "commented"],
- "uid_wall_created" => ["uid", "wall", "created"],
- "private_wall_origin_commented" => ["private", "wall", "origin", "commented"],
- ]
- ],
- "tokens" => [
- "comment" => "OAuth usage",
- "fields" => [
- "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
- "secret" => ["type" => "text", "comment" => ""],
- "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => ["clients" => "client_id"]],
- "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
- "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- ]
- ],
- "user" => [
- "comment" => "The local users",
- "fields" => [
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "parent-uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"],
- "comment" => "The parent user that has full control about this user"],
- "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => "A unique identifier for this user"],
- "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Name that this user is known by"],
- "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "encrypted password"],
- "legacy_password" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Is the password hash double-hashed?"],
- "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "nick- and user name"],
- "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "the users email address"],
- "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
- "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => "PHP-legal timezone"],
- "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => "default language"],
- "register_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of registration"],
- "login_date" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last login"],
- "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Default for item.location"],
- "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 allows to display the location"],
- "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "user theme preference"],
- "pubkey" => ["type" => "text", "comment" => "RSA public key 4096 bit"],
- "prvkey" => ["type" => "text", "comment" => "RSA private key 4096 bit"],
- "spubkey" => ["type" => "text", "comment" => ""],
- "sprvkey" => ["type" => "text", "comment" => ""],
- "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "user is verified through email"],
- "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 for user is blocked"],
- "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to post to the profile page of the user"],
- "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide profile details from unkown viewers"],
- "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Prohibit contacts to tag the post of this user"],
- "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Permit unknown people to send private mails to this user"],
- "cntunkmail" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
- "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => "email notification options"],
- "page-flags" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "page/profile type"],
- "account-type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "pwdreset" => ["type" => "varchar(255)", "comment" => "Password reset request token"],
- "pwdreset_time" => ["type" => "datetime", "comment" => "Timestamp of the last password reset request"],
- "maxreq" => ["type" => "int unsigned", "not null" => "1", "default" => "10", "comment" => ""],
- "expire" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if 1 the account is removed"],
- "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
- "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp when account expires and will be deleted"],
- "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "timestamp of last warning of account expiration"],
- "def_gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => ""],
- "allow_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
- "allow_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
- "deny_cid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
- "deny_gid" => ["type" => "mediumtext", "comment" => "default permission for this user"],
- "openidserver" => ["type" => "text", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["uid"],
- "nickname" => ["nickname(32)"],
- ]
- ],
- "userd" => [
- "comment" => "Deleted usernames",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"],
- "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "username" => ["username(32)"],
- ]
- ],
- "user-contact" => [
- "comment" => "User specific public contact data",
- "fields" => [
- "cid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["contact" => "id"], "comment" => "Contact id of the linked public contact"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
- "blocked" => ["type" => "boolean", "comment" => "Contact is completely blocked for this user"],
- "ignored" => ["type" => "boolean", "comment" => "Posts from this contact are ignored"],
- "collapsed" => ["type" => "boolean", "comment" => "Posts from this contact are collapsed"]
- ],
- "indexes" => [
- "PRIMARY" => ["uid", "cid"]
- ]
- ],
- "user-item" => [
- "comment" => "User specific item data",
- "fields" => [
- "iid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"], "comment" => "Item id"],
- "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["user" => "uid"], "comment" => "User id"],
- "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marker to hide an item from the user"],
- "ignored" => ["type" => "boolean", "comment" => "Ignore this thread if set"]
- ],
- "indexes" => [
- "PRIMARY" => ["uid", "iid"]
- ]
- ],
- "worker-ipc" => [
- "comment" => "Inter process communication between the frontend and the worker",
- "fields" => [
- "key" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
- "jobs" => ["type" => "boolean", "comment" => "Flag for outstanding jobs"],
- ],
- "indexes" => [
- "PRIMARY" => ["key"],
- ],
- "engine" => "MEMORY",
- ],
- "workerqueue" => [
- "comment" => "Background tasks queue entries",
- "fields" => [
- "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
- "parameter" => ["type" => "mediumblob", "comment" => "Task command"],
- "priority" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Task priority"],
- "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
- "pid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
- "executed" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Execution date"],
- "next_try" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Next retrial date"],
- "retrial" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Retrial counter"],
- "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked 1 when the task was done - will be deleted later"],
- ],
- "indexes" => [
- "PRIMARY" => ["id"],
- "pid" => ["pid"],
- "parameter" => ["parameter(64)"],
- "priority_created_next_try" => ["priority", "created", "next_try"],
- "done_priority_executed_next_try" => ["done", "priority", "executed", "next_try"],
- "done_executed_next_try" => ["done", "executed", "next_try"],
- "done_priority_next_try" => ["done", "priority", "next_try"],
- "done_next_try" => ["done", "next_try"]
- ]
- ]
-];
--- /dev/null
+<?php\r
+\r
+// CONFIG.PHP\r
+\r
+/* This file declares the default values for the base config of Friendica.\r
+ *\r
+ * These configuration values aren't accessible from the admin settings page and custom values must be set in config/local.config.php\r
+ *\r
+ * Please don't edit this file directly as its content may change in the upcoming versions.\r
+ */\r
+\r
+return [\r
+ 'database' => [\r
+ // host (String)\r
+ // Hostname or IP address of the database server.\r
+ // Can contain the port number with the syntax "hostname:port".\r
+ 'hostname' => '',\r
+\r
+ // user (String)\r
+ // Database user name. Please don't use "root".\r
+ 'username' => '',\r
+\r
+ // pass (String)\r
+ // Database user password. Please don't use empty passwords.\r
+ 'password' => '',\r
+\r
+ // base (String)\r
+ // Database name.\r
+ 'database' => '',\r
+\r
+ // charset (String)\r
+ // Database connexion charset. Changing this value will likely corrupt special characters.\r
+ 'charset' => 'utf8mb4',\r
+ ],\r
+ 'config' => [\r
+ // admin_email (Comma-separated list)\r
+ // In order to perform system administration via the admin panel,\r
+ // this must precisely match the email address of the person logged in.\r
+ 'admin_email' => '',\r
+\r
+ // admin_nickname (String)\r
+ // Nickname of the main admin user, used if there are more than one admin user defined in config => admin_email.\r
+ 'admin_nickname' => '',\r
+\r
+ // max_import_size (Integer)\r
+ // Maximum body size of DFRN and Mail messages in characters. 0 is unlimited.\r
+ 'max_import_size' => 200000,\r
+\r
+ // php_path (String)\r
+ // Location of PHP command line processor.\r
+ 'php_path' => 'php',\r
+ ],\r
+ 'system' => [\r
+ // allowed_link_protocols (Array)\r
+ // Allowed protocols in links URLs, add at your own risk. http is always allowed.\r
+ 'allowed_link_protocols' => ['ftp', 'ftps', 'mailto', 'cid', 'gopher'],\r
+\r
+ // always_show_preview (Boolean)\r
+ // Only show small preview pictures.\r
+ 'always_show_preview' => false,\r
+\r
+ // archival_days (Integer)\r
+ // Number of days that we try to deliver content before we archive a contact.\r
+ 'archival_days' => 32,\r
+\r
+ // auth_cookie_lifetime (Integer)\r
+ // Number of days that should pass without any activity before a user who\r
+ // chose "Remember me" when logging in is considered logged out.\r
+ 'auth_cookie_lifetime' => 7,\r
+\r
+ // block_local_dir (Boolean)\r
+ // Deny public access to the local user directory.\r
+ 'block_local_dir' => false,\r
+\r
+ // cache_driver (database|memcache|memcached|redis)\r
+ // Whether to use Memcache or Memcached or Redis to store temporary cache.\r
+ 'cache_driver' => 'database',\r
+\r
+ // config_adapter (jit|preload)\r
+ // Allow to switch the configuration adapter to improve performances at the cost of memory consumption.\r
+ 'config_adapter' => 'jit',\r
+\r
+ // curl_range_bytes (Integer)\r
+ // Maximum number of bytes that should be fetched. Default is 0, which mean "no limit".\r
+ 'curl_range_bytes' => 0,\r
+\r
+ // crawl_permit_period (Integer)\r
+ // Period in seconds between allowed searches when the number of free searches is reached and "permit_crawling" is activated.\r
+ 'crawl_permit_period' => 60,\r
+\r
+ // db_log (Path)\r
+ // Name of a logfile to log slow database queries.\r
+ 'db_log' => '',\r
+\r
+ // db_log_index (Path)\r
+ // Name of a logfile to log queries with bad indexes.\r
+ 'db_log_index' => '',\r
+\r
+ // db_log_index_watch (Comma-separated list)\r
+ // Watchlist of indexes to watch.\r
+ 'db_log_index_watch' => '',\r
+\r
+ // db_log_index_blacklist (Comma-separated list)\r
+ // Blacklist of indexes that shouldn't be watched.\r
+ 'db_log_index_blacklist' => '',\r
+\r
+ // db_loglimit (Integer)\r
+ // If a database call lasts longer than this value in seconds it is logged.\r
+ // Inactive if system => db_log is empty.\r
+ 'db_loglimit' => 10,\r
+\r
+ // db_loglimit_index (Integer)\r
+ // Number of index rows needed to be logged for indexes on the watchlist. 0 to disable.\r
+ 'db_loglimit_index' => 0,\r
+\r
+ // db_loglimit_index_high (Integer)\r
+ // Number of index rows to be logged anyway (for any index). 0 to disable.\r
+ 'db_loglimit_index_high' => 0,\r
+\r
+ // dbclean_expire_conversation (Integer)\r
+ // When DBClean is enabled, any entry in the conversation table will be deleted after this many days.\r
+ // This data is used for ActivityPub, so it shouldn't be lower than the average duration of a discussion.\r
+ 'dbclean_expire_conversation' => 90,\r
+\r
+ // dbclean-expire-limit (Integer)\r
+ // This defines the number of items that are to be deleted in a single call.\r
+ // Reduce this value when you are getting memory issues.\r
+ 'dbclean-expire-limit' => 1000,\r
+\r
+ // diaspora_test (Boolean)\r
+ // For development only. Disables the message transfer.\r
+ 'diaspora_test' => false,\r
+\r
+ // disable_email_validation (Boolean)\r
+ // Disables the check if a mail address is in a valid format and can be resolved via DNS.\r
+ 'disable_email_validation' => false,\r
+\r
+ // disable_url_validation (Boolean)\r
+ // Disables the DNS lookup of an URL.\r
+ 'disable_url_validation' => false,\r
+\r
+ // disable_password_exposed (Boolean)\r
+ // Disable the exposition check against the remote haveibeenpwned API on password change.\r
+ 'disable_password_exposed' => false,\r
+\r
+ // disable_polling (Boolean)\r
+ // Disable the polling of DFRN and OStatus contacts through onepoll.php.\r
+ 'disable_polling' => false,\r
+\r
+ // dlogfile (Path)\r
+ // location of the developer log file.\r
+ 'dlogfile' => '',\r
+\r
+ // dlogip (String)\r
+ // restricts develop log writes to requests originating from this IP address.\r
+ 'dlogip' => '',\r
+\r
+ // free_crawls (Integer)\r
+ // Number of "free" searches when system => permit_crawling is enabled.\r
+ 'free_crawls' => 10,\r
+\r
+ // frontend_worker_timeout (Integer)\r
+ // Value in minutes after we think that a frontend task was killed by the webserver.\r
+ 'frontend_worker_timeout' => 10,\r
+\r
+ // groupedit_image_limit (Integer)\r
+ // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names.\r
+ // This can alternatively be set on a per account basis in the pconfig table.\r
+ 'groupedit_image_limit' => 400,\r
+\r
+ // hsts (Boolean)\r
+ // Enables the sending of HTTP Strict Transport Security headers.\r
+ 'hsts' => false,\r
+\r
+ // ignore_cache (Boolean)\r
+ // For development only. Disables the item cache.\r
+ 'ignore_cache' => false,\r
+\r
+ // instances_social_key (String)\r
+ // Key to the API of https://instances.social which retrieves data about mastodon servers.\r
+ // See https://instances.social/api/token to get an API key.\r
+ 'instances_social_key' => '',\r
+\r
+ // ipv4_resolve (Boolean)\r
+ // Resolve IPV4 addresses only. Don't resolve to IPV6.\r
+ 'ipv4_resolve' => false,\r
+\r
+ // invitation_only (Boolean)\r
+ // If set true registration is only possible after a current member of the node has send an invitation.\r
+ 'invitation_only' => false,\r
+\r
+ // like_no_comment (Boolean)\r
+ // Don't update the "commented" value of an item when it is liked.\r
+ 'like_no_comment' => false,\r
+\r
+ // local_block (Boolean)\r
+ // Used in conjunction with "block_public".\r
+ 'local_block' => false,\r
+\r
+ // local_search (Boolean)\r
+ // Blocks search for users who are not logged in to prevent crawlers from blocking your system.\r
+ 'local_search' => false,\r
+\r
+ // local_tags (Boolean)\r
+ // If activated, all hashtags will point to the local server.\r
+ 'local_tags' => false,\r
+\r
+ // max_batch_queue (Integer)\r
+ // Maximum number of batched queue items for a single contact before subsequent messages are discarded.\r
+ 'max_batch_queue' => 1000,\r
+\r
+ // max_connections (Integer)\r
+ // The maximum number of database connections which can be in use before the worker process is deferred to its next interval.\r
+ // When the system can't detect the maximum numbers of connection then this value can be used. Use 0 for auto-detection.\r
+ 'max_connections' => 0,\r
+\r
+ // max_connections_level (Integer 0-100)\r
+ // The maximum percentage of connections that are allowed to let the worker start.\r
+ 'max_connections_level' => 75,\r
+\r
+ // max_contact_queue (Integer)\r
+ // Maximum number of queue items for a single contact before subsequent messages are discarded.\r
+ 'max_contact_queue' => 500,\r
+\r
+ // max_image_length (Integer)\r
+ // An alternate way of limiting picture upload sizes.\r
+ // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).\r
+ // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).\r
+ // If you don't want to set a maximum length, set to -1.\r
+ 'max_image_length' => -1,\r
+\r
+ // max_processes_backend (Integer)\r
+ // Maximum number of concurrent database processes for background tasks.\r
+ 'max_processes_backend' => 5,\r
+\r
+ // max_processes_frontend (Integer)\r
+ // Maximum number of concurrent database processes for foreground tasks.\r
+ 'max_processes_frontend' => 20,\r
+\r
+ // maximagesize (Integer)\r
+ // Maximum size in bytes of an uploaded photo.\r
+ 'maximagesize' => 800000,\r
+\r
+ // memcache_host (String)\r
+ // Host name of the memcache daemon.\r
+ 'memcache_host' => '127.0.0.1',\r
+\r
+ // memcache_port (Integer)\r
+ // Port number of the memcache daemon.\r
+ 'memcache_port' => 11211,\r
+\r
+ // memcached_hosts (Array)\r
+ // Array of Memcached servers info [host, port(, weight)], see Memcached::addServers.\r
+ 'memcached_hosts' => [\r
+ ['127.0.0.1', '11211'],\r
+ ],\r
+\r
+ // min_poll_interval (Integer)\r
+ // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59.\r
+ 'min_poll_interval' => 1,\r
+\r
+ // no_count (Boolean)\r
+ // Don't do count calculations (currently only when showing photo albums).\r
+ 'no_count' => false,\r
+\r
+ // no_oembed (Boolean)\r
+ // Don't use OEmbed to fetch more information about a link.\r
+ 'no_oembed' => false,\r
+\r
+ // no_smilies (Boolean)\r
+ // Don't show smilies.\r
+ 'no_smilies' => false,\r
+\r
+ // no_view_full_size (Boolean)\r
+ // Don't add the link "View full size" under a resized image.\r
+ 'no_view_full_size' => false,\r
+\r
+ // optimize_items (Boolean)\r
+ // Triggers an SQL command to optimize the item table before expiring items.\r
+ 'optimize_items' => false,\r
+\r
+ // paranoia (Boolean)\r
+ // Log out users if their IP address changed.\r
+ 'paranoia' => false,\r
+\r
+ // permit_crawling (Boolean)\r
+ // Restricts the search for not logged in users to one search per minute.\r
+ 'permit_crawling' => false,\r
+\r
+ // pidfile (Path)\r
+ // Daemon pid file path. For example: pidfile = /path/to/daemon.pid\r
+ 'pidfile' => '',\r
+\r
+ // png_quality (Integer)\r
+ // Sets the ImageMagick compression level for PNG images. Values ranges from 0 (uncompressed) to 9 (most compressed).\r
+ 'png_quality' => 8,\r
+\r
+ // profiler (Boolean)\r
+ // Enable internal timings to help optimize code. Needed for "rendertime" addon.\r
+ 'profiler' => false,\r
+\r
+ // proxy_cache_time (Integer)\r
+ // Period in seconds after which the cache is cleared.\r
+ 'proxy_cache_time' => 86400,\r
+\r
+ // pushpoll_frequency (Integer)\r
+ // Frequency of contact poll for subhub contact using the DFRM or OStatus network.\r
+ // Available values:\r
+ // - 5 = every month\r
+ // - 4 = every week\r
+ // - 3 = every day\r
+ // - 2 = twice a day\r
+ // - 1 = every hour\r
+ // - 0 = every minute\r
+ 'pushpoll_frequency' => 3,\r
+\r
+ // queue_no_dead_check (Boolean)\r
+ // Ignore if the target contact or server seems to be dead during queue delivery.\r
+ 'queue_no_dead_check' => false,\r
+\r
+ // redis_host (String)\r
+ // Host name of the redis daemon.\r
+ 'redis_host' => '127.0.0.1',\r
+\r
+ // redis_port (String)\r
+ // Port number of the redis daemon.\r
+ 'redis_port' => 6379,\r
+\r
+ // session_handler (database|cache|native)\r
+ // Whether to use Cache to store session data or to use PHP native session storage.\r
+ 'session_handler' => 'database',\r
+\r
+ // remove_multiplicated_lines (Boolean)\r
+ // If enabled, multiple linefeeds in items are stripped to a single one.\r
+ 'remove_multiplicated_lines' => false,\r
+\r
+ // sendmail_params (Boolean)\r
+ // Normal sendmail command parameters will be added when the PHP mail() function is called for sending e-mails.\r
+ // This ensures the Sender Email address setting is applied to the message envelope rather than the host's default address.\r
+ // Set to false if your non-sendmail agent is incompatible, or to restore old behavior of using the host address.\r
+ 'sendmail_params' => true,\r
+\r
+ // show_global_community_hint (Boolean)\r
+ // When the global community page is enabled, use this option to display a hint above the stream, that this is a collection of all public top-level postings that arrive on your node.\r
+ 'show_global_community_hint' => false,\r
+\r
+ // show_unsupported_addons (Boolean)\r
+ // Show all addons including the unsupported ones.\r
+ 'show_unsupported_addons' => false,\r
+\r
+ // show_unsupported_themes (Boolean)\r
+ // Show all themes including the unsupported ones.\r
+ 'show_unsupported_themes' => false,\r
+\r
+ // throttle_limit_day (Integer)\r
+ // Maximum number of posts that a user can send per day with the API. 0 to disable daily throttling.\r
+ 'throttle_limit_day' => 0,\r
+\r
+ // throttle_limit_week (Integer)\r
+ // Maximum number of posts that a user can send per week with the API. 0 to disable weekly throttling.\r
+ 'throttle_limit_week' => 0,\r
+\r
+ // throttle_limit_month (Integer)\r
+ // Maximum number of posts that a user can send per month with the API. 0 to disable monthly throttling.\r
+ 'throttle_limit_month' => 0,\r
+\r
+ // urlpath (String)\r
+ // If you are using a subdirectory of your domain you will need to put the relative path (from the root of your domain) here.\r
+ // For instance if your URL is 'http://example.com/directory/subdirectory', set urlpath to 'directory/subdirectory'.\r
+ 'urlpath' => '',\r
+\r
+ // username_min_length (Integer)\r
+ // The minimum character length a username can be.\r
+ // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.\r
+ // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.\r
+ 'username_min_length' => 3,\r
+\r
+ // username_max_length (Integer)\r
+ // The maximum character length a username can be.\r
+ // This length is check once the username has been trimmed and multiple spaces have been collapsed into one.\r
+ // Minimum for this config value is 1. Maximum is 64 as the resulting profile URL mustn't be longer than 255 chars.\r
+ 'username_max_length' => 48,\r
+\r
+ // worker_cooldown (Integer)\r
+ // Cooldown period in seconds after each worker function call.\r
+ 'worker_cooldown' => 0,\r
+\r
+ // worker_debug (Boolean)\r
+ // If enabled, it prints out the number of running processes split by priority.\r
+ 'worker_debug' => false,\r
+\r
+ // worker_fetch_limit (Integer)\r
+ // Number of worker tasks that are fetched in a single query.\r
+ 'worker_fetch_limit' => 1,\r
+\r
+ // worker_load_exponent (Integer)\r
+ // Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.\r
+ // For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.\r
+ // Setting 0 would allow maximum worker queues at all times, which is not recommended.\r
+ 'worker_load_exponent' => 3,\r
+\r
+ // xrd_timeout (Integer)\r
+ // Timeout in seconds for fetching the XRD links.\r
+ 'xrd_timeout' => 20,\r
+ ],\r
+ 'experimental' => [\r
+ // exp_themes (Boolean)\r
+ // Show experimental themes in user settings.\r
+ 'exp_themes' => false,\r
+ ],\r
+ 'theme' => [\r
+ // hide_eventlist (Boolean)\r
+ // Don't show the birthdays and events on the profile and network page.\r
+ 'hide_eventlist' => false,\r
+ ],\r
+ 'jabber' => [\r
+ // debug (Boolean)\r
+ // Enable debug level for the jabber account synchronisation.\r
+ 'debug' => false,\r
+ // lockpath (Path)\r
+ // Must be writable by the ejabberd process. if set then it will prevent the running of multiple processes.\r
+ 'lockpath' => '',\r
+ ],\r
+];\r
--- /dev/null
+<?php\r
+\r
+// Local configuration\r
+\r
+/* If automatic system installation fails:\r
+ *\r
+ * Copy this file to local.config.php\r
+ *\r
+ * Why local.config.php? Because it contains sensitive information which could\r
+ * give somebody complete control of your database. Apache's default\r
+ * configuration will interpret any .php file as a script and won't show the values\r
+ *\r
+ * Then set the following for your MySQL installation\r
+ *\r
+ * If you're unsure about what any of the config keys below do, please check the config/defaults.config.php file for\r
+ * detailed documentation of their data type and behavior.\r
+ */\r
+\r
+return [\r
+ 'database' => [\r
+ 'hostname' => 'localhost',\r
+ 'username' => 'mysqlusername',\r
+ 'password' => 'mysqlpassword',\r
+ 'database' => 'mysqldatabasename',\r
+ 'charset' => 'utf8mb4',\r
+ ],\r
+\r
+ // ****************************************************************\r
+ // The configuration below will be overruled by the admin panel.\r
+ // Changes made below will only have an effect if the database does\r
+ // not contain any configuration for the friendica system.\r
+ // ****************************************************************\r
+\r
+ 'config' => [\r
+ 'admin_email' => '',\r
+ 'sitename' => 'Friendica Social Network',\r
+ 'register_policy' => REGISTER_OPEN,\r
+ 'register_text' => '',\r
+ ],\r
+ 'system' => [\r
+ 'default_timezone' => 'UTC',\r
+ 'language' => 'en',\r
+ ],\r
+];\r
+++ /dev/null
-<?php return <<<INI
-
-; If automatic system installation fails:
-
-; Copy this file to local.ini.php
-
-; Why local.ini.php? Because it contains sensitive information which could
-; give somebody complete control of your database. Apache's default
-; configuration will interpret any .php file as a script and won't show the values
-
-; Then set the following for your MySQL installation
-
-[database]
-hostname = localhost
-username = mysqlusername
-password = mysqlpassword
-database = mysqldatabasename
-charset = utf8mb4
-
-
-; ****************************************************************
-; The configuration below will be overruled by the admin panel.
-; Changes made below will only have an effect if the database does
-; not contain any configuration for the friendica system.
-; ****************************************************************
-
-[config]
-admin_email =
-
-sitename = Friendica Social Network
-
-register_policy = REGISTER_OPEN
-register_text =
-
-[system]
-default_timezone = UTC
-
-language = en
-
-INI;
-// Keep this line
--- /dev/null
+<?php\r
+\r
+// SETTINGS.PHP\r
+\r
+/* This file declares the default values for the admin settings of Friendica.\r
+ *\r
+ * These values will be overridden by the admin settings page.\r
+ *\r
+ * Please don't edit this file directly as its content may change in the upcoming versions.\r
+ */\r
+\r
+return [\r
+ 'config' => [\r
+ // info (String)\r
+ // Plaintext description of this node, used in the /friendica module.\r
+ 'info' => '',\r
+\r
+ // register_policy (Constant)\r
+ // Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.\r
+ // Be certain to create your own personal account before setting REGISTER_CLOSED.\r
+ // REGISTER_APPROVE requires you set system.admin_email to the email address of an already registered person who can authorize and/or approve/deny the request.\r
+ 'register_policy' => REGISTER_CLOSED,\r
+\r
+ // register_text (String)\r
+ // Will be displayed prominently on the registration page.\r
+ 'register_text' => '',\r
+\r
+ // sitename (String)\r
+ // Displayed server name.\r
+ 'sitename' => 'Friendica Social Network',\r
+ ],\r
+ 'system' => [\r
+ // account_abandon_days (Integer)\r
+ // Will not waste system resources polling external sites for abandonded accounts.\r
+ // Enter 0 for no time limit.\r
+ 'account_abandon_days' => 0,\r
+\r
+ // addon (Comma-separated list)\r
+ // Manual list of addons which are enabled on this system.\r
+ 'addon' => '',\r
+\r
+ // allowed_themes (Comma-separated list)\r
+ // Themes users can change to in their settings.\r
+ 'allowed_themes' => 'quattro,vier,duepuntozero,smoothly',\r
+\r
+ // default_timezone (String)\r
+ // Choose a default timezone. See https://secure.php.net/manual/en/timezones.php\r
+ // It only applies to timestamps for anonymous viewers.\r
+ 'default_timezone' => 'UTC',\r
+\r
+ // directory (String)\r
+ // URL of the global directory.\r
+ 'directory' => 'https://dir.friendica.social',\r
+\r
+ // forbidden_nicknames (Comma-separated list)\r
+ // Prevents users from registering the specified nicknames on this node.\r
+ // Default value comprises classic role names from RFC 2142.\r
+ 'forbidden_nicknames' => 'info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop',\r
+\r
+ // jpeg_quality (Integer)\r
+ // Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect).\r
+ 'jpeg_quality' => 100,\r
+\r
+ // language (String)\r
+ // System default languague, inluding admin-created user default language.\r
+ // Two-letters ISO 639-1 code.\r
+ 'language' => 'en',\r
+\r
+ // max_image_length (Integer)\r
+ // An alternate way of limiting picture upload sizes.\r
+ // Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).\r
+ // Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).\r
+ // If you don't want to set a maximum length, set to -1.\r
+ 'max_image_length' => -1,\r
+\r
+ // maximagesize (Integer)\r
+ // Maximum size in bytes of an uploaded photo.\r
+ 'maximagesize' => 800000,\r
+\r
+ // no_regfullname (Boolean)\r
+ // Allow pseudonyms (true) or enforce a space between first name and last name in Full name, as an anti spam measure (false).\r
+ 'no_regfullname' => true,\r
+\r
+ // optimize_max_tablesize (Integer)\r
+ // Maximum table size (in MB) for the automatic optimization.\r
+ // -1 to disable automatic optimization.\r
+ // 0 to use internal default (100MB)\r
+ 'optimize_max_tablesize' => -1,\r
+\r
+ // rino_encrypt (Integer)\r
+ // Server-to-server private message encryption (RINO).\r
+ // Encryption will only be provided if this setting is set to a non zero value on both servers.\r
+ // Set to 0 to disable, 2 to enable, 1 is deprecated but won't need mcrypt.\r
+ 'rino_encrypt' => 2,\r
+\r
+ // temppath (String)\r
+ // Custom temporary file directory\r
+ 'temppath' => '',\r
+\r
+ // theme (String)\r
+ // System theme name.\r
+ 'theme' => 'vier',\r
+\r
+ // url (String)\r
+ // The fully-qualified URL of this Friendica node.\r
+ // Used by the worker in a non-HTTP execution environment.\r
+ 'url' => '',\r
+ ],\r
+\r
+ // Used in the admin settings to lock certain features\r
+ 'featurelock' => [\r
+ ],\r
+];\r
+++ /dev/null
-<?php return <<<INI
-
-; SETTINGS.INI.PHP
-
-; This file declares the default values for the admin settings of Friendica.
-; These values will be overriden by the admin settings page.
-
-; Please don't edit this file directly as its content may change in the upcoming versions.
-
-[config]
-
-; info (String)
-; Plaintext description of this node, used in the /friendica module.
-info =
-
-; register_policy (Constant)
-; Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED.
-; Be certain to create your own personal account before setting REGISTER_CLOSED.
-; REGISTER_APPROVE requires you set system.admin_email to the email address of an already registered person who can authorize and/or approve/deny the request.
-register_policy = REGISTER_CLOSED
-
-; register_text (String)
-; Will be displayed prominently on the registration page.
-register_text = ''
-
-; sitename (String)
-; Displayed server name.
-sitename = "Friendica Social Network"
-
-[system]
-
-; account_abandon_days (Integer)
-; Will not waste system resources polling external sites for abandonded accounts.
-; Enter 0 for no time limit.
-account_abandon_days = 0
-
-; addon (Comma-separated list)
-; Manual list of addons which are enabled on this system.
-addon =
-
-; allowed_themes (Comma-separated list)
-; Themes users can change to in their settings.
-allowed_themes = 'quattro,vier,duepuntozero,smoothly'
-
-; default_timezone (String)
-; Choose a default timezone. See https://secure.php.net/manual/en/timezones.php
-; It only applies to timestamps for anonymous viewers.
-default_timezone = UTC
-
-; directory (String)
-; URL of the global directory.
-directory = https://dir.friendica.social
-
-; forbidden_nicknames (Comma-separated list)
-; Prevents users from registering the specified nicknames on this node.
-; Default value comprises classic role names from RFC 2142.
-forbidden_nicknames = info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop
-
-; jpeg_quality (Integer)
-; Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect).
-jpeg_quality = 100
-
-; language (String)
-; System default languague, inluding admin-created user default language.
-; Two-letters ISO 639-1 code.
-language = en
-
-; max_image_length (Integer)
-; An alternate way of limiting picture upload sizes.
-; Specify the maximum pixel length that pictures are allowed to be (for non-square pictures, it will apply to the longest side).
-; Pictures longer than this length will be resized to be this length (on the longest side, the other side will be scaled appropriately).
-; If you don't want to set a maximum length, set to -1.
-max_image_length = -1
-
-; maximagesize (Integer)
-; Maximum size in bytes of an uploaded photo.
-maximagesize = 800000
-
-; no_regfullname (Boolean)
-; Allow pseudonyms (true) or enforce a space between firstname and lastname in Full name, as an antispam measure (false).
-no_regfullname = true
-
-; optimize_max_tablesize (Integer)
-; Maximum table size (in MB) for the automatic optimization.
-; -1 to disable automatic optimization.
-; 0 to use internal default (100MB)
-optimize_max_tablesize = -1
-
-; rino_encrypt (Integer)
-; Server-to-server private message encryption (RINO).
-; Encryption will only be provided if this setting is set to a non zero value on both servers.
-; Set to 0 to disable, 2 to enable, 1 is deprecated but wont need mcrypt.
-rino_encrypt = 2
-
-; temppath (String)
-; Custom temporary file directory
-temppath =
-
-; theme (String)
-; System theme name.
-theme = vier
-
-; url (String)
-; The fully-qualified URL of this Friendica node.
-; Used by the worker in a non-HTTP execution environment.
-url =
-
-; Used in the admin settings to lock certain features
-[featurelock]
-
-INI;
-// Keep this line
-Config values that can only be set in config/local.ini.php
+Config values that can only be set in config/local.config.php
==========================================================
* [Home](help)
-Friendica's configuration is done in two places: in INI configuration files and in the `config` database table.
+Friendica's configuration is done in two places: in PHP array configuration files and in the `config` database table.
Database config values overwrite the same file config values.
## File configuration
-WARNING: some characters `?{}|&~![()^"` should not be used in the keys or values. If one of those character is required put the value between double quotes (eg. password = "let&me&in")
-The configuration format for file configuration is an INI string returned from a PHP file.
-This prevents your webserver from displaying your private configuration it interprets the configuration files and displays nothing.
+The configuration format for file configuration is an array returned from a PHP file.
+This prevents your webserver from displaying your private configuration. It interprets the configuration files and displays nothing.
A typical configuration file looks like this:
```php
-<?php return <<<INI
-
-; Comment line
-
-[section1]
-key = value
-empty_key =
-
-[section2]
-array[] = value0
-array[] = value1
-array[] = value2
-
-INI;
-// Keep this line
+<?php
+
+/*
+ * Comment block
+ */
+
+return [
+ 'section1' => [
+ // Comment line
+ 'key' => 'value',
+ ],
+ 'section2' => [
+ 'array' => ['value0', 'value1', 'value2'],
+ ],
+];
```
### Configuration location
The `config` directory holds key configuration files:
-- `config.ini.php` holds the default values for all the configuration keys that can only be set in `local.ini.php`.
-- `settings.ini.php` holds the default values for some configuration keys that are set through the admin settings page.
-- `local.ini.php` holds the current node custom configuration.
-- `addon.ini.php` is optional and holds the custom configuration for specific addons.
+- `defaults.config.php` holds the default values for all the configuration keys that can only be set in `local.config.php`.
+- `settings.config.php` holds the default values for some configuration keys that are set through the admin settings page.
+- `local.config.php` holds the current node custom configuration.
+- `addon.config.php` is optional and holds the custom configuration for specific addons.
-Addons can define their own default configuration values in `addon/[addon]/config/[addon].ini.php` which is loaded when the addon is activated.
+Addons can define their own default configuration values in `addon/[addon]/config/[addon].config.php` which is loaded when the addon is activated.
-#### Migrating from .htconfig.php to config/local.ini.php
+#### Migrating from .htconfig.php to config/local.config.php
The legacy `.htconfig.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
The migration is pretty straightforward:
-If you had any addon-specific configuration in your `.htconfig.php`, just copy `config/addon-sample.ini.php` to `config/addon.ini.php` and move your configuration values.
-Afterwards, copy `config/local-sample.ini.php` to `config/local.ini.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `.htconfig.php` to check your node is working as expected before deleting it.
+If you had any addon-specific configuration in your `.htconfig.php`, just copy `config/addon-sample.config.php` to `config/addon.config.php` and move your configuration values.
+Afterwards, copy `config/local-sample.config.php` to `config/local.config.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `.htconfig.php` to check your node is working as expected before deleting it.
<style>
table.config {
<thead>
<tr>
<th>.htconfig.php</th>
- <th>config/local.ini.php</th>
+ <th>config/local.config.php</th>
</tr>
</thead>
<tbody>
$a->config["system"]["db_charset"] = 'utf8mb4';
</pre></td>
<td><pre>
-[database]
-hostname = localhost
-username = mysqlusername
-password = mysqlpassword
-database = mysqldatabasename
-charset = utf8mb4
+'database' => [
+ 'hostname' => 'localhost',
+ 'username' => 'mysqlusername',
+ 'password' => 'mysqlpassword',
+ 'database' => 'database',
+ 'charset' => 'utf8mb4',
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$a->config["section"]["key"] = "value";
</pre></td>
<td><pre>
-[section]
-key = value
+'section' => [
+ 'key' => 'value',
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$a->config["section"]["key"] = array(
);
</pre></td>
<td><pre>
-[section]
-key[] = value1
-key[] = value2
-key[] = value3
+'section' => [
+ 'key' => ['value1', 'value2', 'value3'],
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$a->config["key"] = "value";
</pre></td>
<td><pre>
-[config]
-key = value
+'config' => [
+ 'key' => 'value',
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$a->path = "value";
</pre></td>
<td><pre>
-[system]
-urlpath = value
+'system' => [
+ 'urlpath' => 'value',
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$default_timezone = "value";
</pre></td>
<td><pre>
-[system]
-default_timezone = value
+'system' => [
+ 'default_timezone' => 'value',
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$pidfile = "value";
</pre></td>
<td><pre>
-[system]
-pidfile = value
+'system' => [
+ 'pidfile' => 'value',
+],
</pre></td>
</tr>
-
<tr>
<td><pre>
$lang = "value";
</pre></td>
<td><pre>
-[system]
-language = value
+'system' => [
+ 'language' => 'value',
+],
</pre></td>
</tr>
+ </tbody>
+</table>
+
+#### Migrating from config/local.ini.php to config/local.config.php
+
+The legacy `config/local.ini.php` configuration file is still supported, but is deprecated and will be removed in a subsequent Friendica release.
+
+The migration is pretty straightforward:
+If you had any addon-specific configuration in your `config/addon.ini.php`, just copy `config/addon-sample.config.php` to `config/addon.config.php` and move your configuration values.
+Afterwards, copy `config/local-sample.config.php` to `config/local.config.php`, move the remaining configuration values to it according to the following conversion chart, then rename your `config/local.ini.php` file to check your node is working as expected before deleting it.
+<table class="config">
+ <thead>
+ <tr>
+ <th>config/local.ini.php</th>
+ <th>config/local.config.php</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><pre>
+[database]
+hostname = localhost
+username = mysqlusername
+password = mysqlpassword
+database = mysqldatabasename
+charset = utf8mb4
+</pre></td>
+ <td><pre>
+'database' => [
+ 'hostname' => 'localhost',
+ 'username' => 'mysqlusername',
+ 'password' => 'mysqlpassword',
+ 'database' => 'database',
+ 'charset' => 'utf8mb4',
+],
+</pre></td>
+ </tr>
+ <tr>
+ <td><pre>
+[section]
+key = value
+</pre></td>
+ <td><pre>
+'section' => [
+ 'key' => 'value',
+],
+</pre></td>
+ </tr>
+ <tr>
+ <td><pre>
+[section]
+key[] = value1
+key[] = value2
+key[] = value3
+</pre></td>
+ <td><pre>
+'section' => [
+ 'key' => ['value1', 'value2', 'value3'],
+],
+</pre></td>
+ </tr>
</tbody>
</table>
+
### Database Settings
The configuration variables database.hostname, database.username, database.password, database.database and database.charset are holding your credentials for the database connection.
If you need to specify a port to access the database, you can do so by appending ":portnumber" to the database.hostname variable.
- [database]
- hostname = your.mysqlhost.com:123456
+ 'database' => [
+ 'hostname' => 'your.mysqlhost.com:123456',
+ ...
+ ]
If all of the following environment variables are set, Friendica will use them instead of the previously configured variables for the db:
MYSQL_PASSWORD
MYSQL_DATABASE
-## Config values that can only be set in config/local.ini.php
+## Config values that can only be set in config/local.config.php
There are some config values that haven't found their way into the administration page.
This has several reasons.
**Attention:** Please be warned that you shouldn't use one of these values without the knowledge what it could trigger.
Especially don't do that with undocumented values.
-These configurations keys and their default value are listed in `config/config.ini.php` and should be ovewritten in `config/local.ini.php`.
+These configurations keys and their default value are listed in `config/defaults.config.php` and should be overwritten in `config/local.config.php`.
## Administrator Options
Enabling the admin panel for an account, and thus making the account holder admin of the node, is done by setting the variable
- [config]
- admin_email = someone@example.com
+ 'config' => [
+ 'admin_email' => 'someone@example.com',
+ ]
+
-Where you have to match the email address used for the account with the one you enter to the config/local.ini.php file.
+Where you have to match the email address used for the account with the one you enter to the `config/local.config.php` file.
If more then one account should be able to access the admin panel, separate the email addresses with a comma.
- [config]
- admin_email = someone@example.com,someoneelse@example.com
+ 'config' => [
+ 'admin_email' => 'someone@example.com,someoneelse@example.com',
+ ]
-If you want to have a more personalized closing line for the notification emails you can set a variable for the admin_name.
+If you want to have a more personalized closing line for the notification emails you can set a variable for the `admin_name`.
- [config]
- admin_name = Marvin
+ 'config' => [
+ 'admin_name' => 'Marvin',
+ ]
Friendica uses HTML5 for embedding content.
Therefore, the supported files are dependent on your browser and operating system.
-Some supported filetypes are WebM, MP4, MP3 and OGG.
+Some supported file types are WebM, MP4, MP3 and OGG.
See Wikipedia for more of them ([video](http://en.wikipedia.org/wiki/HTML5_video), [audio](http://en.wikipedia.org/wiki/HTML5_audio)).
<a name="avatars"></a>
<a name="clients"></a>
### Are there any clients for friendica I can use?
-Friendica is using a [Twitter/GNU Social compatible API](help/api), which means you can use any Twitter/GNU Social client for your plattform as long as you can change the API path in its settings.
+Friendica is using a [Twitter/GNU Social compatible API](help/api), which means you can use any Twitter/GNU Social client for your platform as long as you can change the API path in its settings.
Here is a list of known working clients:
* Android
<a name="sources"></a>
### Where can I find the source code of friendica, addons and themes?
-You can find the main respository [here](https://github.com/friendica/friendica).
+You can find the main repository [here](https://github.com/friendica/friendica).
There you will always find the current stable version of friendica.
Addons are listed at [this page](https://github.com/friendica/friendica-addons).
<a name="adminaccount1"></a>
### I've changed my email address now the admin panel is gone?
-Have a look into your <tt>config/local.ini.php</tt> and fix your email address there.
+Have a look into your <tt>config/local.config.php</tt> and fix your email address there.
<a name="adminaccount2"></a>
### Can there be more then one admin for a node?
Yes.
You just have to list more then one email address in the
-<tt>config/local.ini.php</tt> file.
+<tt>config/local.config.php</tt> file.
The listed emails need to be separated by a comma.
<a name="dbupdate">
* [Installing Connectors (Twitter/GNU Social)](help/Installing-Connectors)
* [Install an ejabberd server (XMPP chat) with synchronized credentials](help/install-ejabberd)
* [Using SSL with Friendica](help/SSL)
-* [Config values that can only be set in config/local.ini.php](help/Config)
+* [Config values that can only be set in config/local.config.php](help/Config)
* [Improve Performance](help/Improve-Performance)
* [Administration Tools](help/tools)
* [Twitter/GNU Social API Functions](help/api)
* [Code (Doxygen generated - sets cookies)](doc/html/)
* [Protocol Documentation](help/Protocol)
- * [Database schema documantation](help/database)
+ * [Database schema documentation](help/database)
* [Class Autoloading](help/autoloader)
**External Resources**
* Curl, GD, PDO, MySQLi, hash, xml, zip and OpenSSL extensions
* The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it)
* some form of email server or email gateway such that PHP mail() works
-* Mysql 5.5.3+ or an equivalant alternative for MySQL (MariaDB, Percona Server etc.)
+* Mysql 5.5.3+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.)
* the ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks (Windows) (Note: other options are presented in Section 7 of this document.)
* Installation into a top-level domain or sub-domain (without a directory/path component in the URL) is preferred. Directory paths will not be as convenient to use and have not been thoroughly tested.
* If your hosting provider doesn't allow Unix shell access, you might have trouble getting everything to work.
If you copy the directory tree to your webserver, make sure that you also copy .htaccess - as "dot" files are often hidden and aren't normally copied.
-If you want to use the development version of Friendica you can switch to the devel branch in the repository by running
+If you want to use the development version of Friendica you can switch to the develop branch in the repository by running
git checkout develop
bin/composer.phar install
*If* the manual installation fails for any reason, check the following:
-* Does "config/local.ini.php" exist? If not, edit config/local-sample.ini.php and change the system settings.
-* Rename to `config/local.ini.php`.
+* Does "config/local.config.php" exist? If not, edit config/local-sample.config.php and change the system settings.
+* Rename to `config/local.config.php`.
* Is the database is populated? If not, import the contents of `database.sql` with phpmyadmin or the mysql command line.
At this point visit your website again, and register your personal account.
Registration errors should all be recoverable automatically.
If you get any *critical* failure at this point, it generally indicates the database was not installed correctly.
-You might wish to move/rename `config/local.ini.php` to another name and empty (called 'dropping') the database tables, so that you can start fresh.
+You might wish to move/rename `config/local.config.php` to another name and empty (called 'dropping') the database tables, so that you can start fresh.
### Option B: Run the automatic install script
You have the following options to automatically install Friendica:
-- creating a prepared config file (f.e. `prepared.ini.php`)
+- creating a prepared config file (f.e. `prepared.config.php`)
- using environment variables (f.e. `MYSQL_HOST`)
- using options (f.e. `--dbhost <host>`)
*If* the automatic installation fails for any reason, check the following:
-* Does `config/local.ini.php` already exist? If yes, the automatic installation won't start
-* Are the options in the `config/local.ini.php` correct? If not, edit them directly.
+* Does `config/local.config.php` already exist? If yes, the automatic installation won't start
+* Are the options in the `config/local.config.php` correct? If not, edit them directly.
* Is the empty MySQL-database created? If not, create it.
#### B.1: Config file
-You can use a prepared config file like [local-sample.ini.php](config/local-sample.ini.php).
+You can use a prepared config file like [local-sample.config.php](config/local-sample.config.php).
Navigate to the main Friendica directory and execute the following command:
- bin/console autoinstall -f <prepared.ini.php>
+ bin/console autoinstall -f <prepared.config.php>
#### B.2: Environment variables
**Database credentials**
-if you don't use the option `--savedb` during installation, the DB credentials will **not** be saved in the `config/local.ini.php`.
+if you don't use the option `--savedb` during installation, the DB credentials will **not** be saved in the `config/local.config.php`.
- `MYSQL_HOST` The host of the mysql/mariadb database
- `MYSQL_PORT` The port of the mysql/mariadb database
**Friendica settings**
This variables wont be used at normal Friendica runtime.
-Instead, they get saved into `config/local.ini.php`.
+Instead, they get saved into `config/local.config.php`.
- `FRIENDICA_URL_PATH` The URL path of Friendica (f.e. '/friendica')
- `FRIENDICA_PHP_PATH` The path of the PHP binary
- `FRIENDICA_ADMIN_MAIL` The admin email address of Friendica (this email will be used for admin access)
- `FRIENDICA_TZ` The timezone of Friendica
-- `FRIENDICA_LANG` The langauge of Friendica
+- `FRIENDICA_LANG` The language of Friendica
Navigate to the main Friendica directory and execute the following command:
#### B.3: Execution options
-All options will be saved in the `config/local.ini.php` and are overruling the associated environment variables.
+All options will be saved in the `config/local.config.php` and are overruling the associated environment variables.
- `-H|--dbhost <host>` The host of the mysql/mariadb database (env `MYSQL_HOST`)
- `-p|--dbport <port>` The port of the mysql/mariadb database (env `MYSQL_PORT`)
Let there be a hardware failure, a corrupted database or whatever you can think of.
So once the installation of your Friendica node is done, you should make yourself a backup plan.
-The most important file is the `config/local.ini.php` file.
+The most important file is the `config/local.config.php` file.
As it stores all your data, you should also have a recent dump of your Friendica database at hand, should you have to recover your node.
This is accomplished through the site administration panel.
Each of the connectors also requires an "API key" from the service you wish to connect with.
-Some addons allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (config/local.ini.php).
+Some addons allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (config/local.config.php).
The ways to obtain these keys vary between the services, but they all require an existing account on the target service.
Once installed, these API keys can usually be shared by all site members.
Register your Friendica site as "Client" application with "Read & Write" access.
We do not need "Twitter as login".
When you've registered the app you get a key pair with an OAuth Consumer key and a secret key for your application/site.
-Add this key pair to your config/local.ini.php:
+Add this key pair to your config/local.config.php:
[twitter]
consumerkey = your consumer_key here
These information include the amount of messages currently being processed in the queues.
The first number is the number of messages which could not been delivered for various reasons.
They will be resend later.
-You can have a quick glance into that second queus in the "Inspect Queue" section of the admin panel.
+You can have a quick glance into that second queues in the "Inspect Queue" section of the admin panel.
The second number represents the current number of jobs for the background workers.
These worker tasks are prioritised and are done accordingly.
As well as an overview of the currently active addons
The list is linked, so you can have quick access to the Addon settings.
And finally you are informed about the version of Friendica you have installed.
-If you contact the devs with a bug or problem, please also mention the version of your node.
+If you contact the developers with a bug or problem, please also mention the version of your node.
-The admin panel is seperated into subsections accessible from the side bar of the panel.
+The admin panel is separated into subsections accessible from the side bar of the panel.
## Site
It is used as fall back setting should Friendica fail to recognize the visitors preferences and can be overwritten by user settings.
The Friendica community offers some translations.
-Some more compleate then others.
+Some more complete then others.
See [this help page](/help/translations) for more information about the translation process.
#### System Theme
Choose a theme to be the default system theme.
This can be over-ridden by user profiles.
-Default theme is "duepunto zero" at the moment.
+Default theme is `vier` at the moment.
You may also want to set a special theme for mobile interfaces.
-Which may or may not be neccessary depending of the mobile friendlyness of the desktop theme you have chosen.
+Which may or may not be necessary depending of the mobile friendliness of the desktop theme you have chosen.
The `vier` theme for instance is mobile friendly.
### Registration
##### Invitation based registry
-Additionally to the setting in the admin panel, you can devide if registrations are only possible using an invitation code or not.
-To enable invitation based registration, you have to set the `invitation_only` setting in the [config/local.ini.php](/help/Config) file.
+Additionally to the setting in the admin panel, you can decide if registrations are only possible using an invitation code or not.
+To enable invitation based registration, you have to set the `invitation_only` setting in the [config/local.config.php](/help/Config) file.
If you want to use this method, the registration policy has to be set to either *open* or *requires approval*.
#### Check Full Names
Your site configuration can block registration (or require approval to register).
By default, logged in users can register additional accounts for use as pages.
These will still require approval if the registration policy is set to *require approval*
-You may prohibit logged in users from creating additional accounts by setting *block multible registrations* to true.
+You may prohibit logged in users from creating additional accounts by setting *block multiple registrations* to true.
Default is false.
### File upload
(Wildcard support on Windows platforms requires PHP5.3).
By default, any (valid) domain may establish friendships with this site.
-This is useful if you want to setup a closed network for educational groups, cooperations and similar communities that don't want to commuicate with the rest of the network.
+This is useful if you want to setup a closed network for educational groups, cooperatives and similar communities that don't want to communicate with the rest of the network.
#### Allowed Email Domains
Default is 60 seconds.
Set to 0 for unlimited (not recommended).
-#### Verify SSL Certitificates
+#### Verify SSL Certificates
By default Friendica allows SSL communication between websites that have "self-signed" SSL certificates.
For the widest compatibility with browsers and other networks we do not recommend using self-signed certificates, but we will not prevent you from using them.
To guarantee that important tasks are executed even though the system has a lot of work to do, it is useful to enable the *fastlane*.
Should you not be able to run a cron job on your server, you can also activate the *frontend* worker.
-If you have done so, you can call `example.com/worker` (replace example.com with your actual domain name) on a regular basis from an external servie.
+If you have done so, you can call `example.com/worker` (replace example.com with your actual domain name) on a regular basis from an external service.
This will then trigger the execution of the background process.
### Relocate
Here the admin can also block/unblock users from accessing the node or delete the accounts entirely.
In the last section of the page admins can create new accounts on the node.
-The password for the new account will be send by email to the choosen email address.
+The password for the new account will be send by email to the chosen email address.
## Addons
This page is for selecting and configuration of extensions for Friendica which have to be placed into the `/addon` subdirectory of your Friendica installation.
You are presented with a long list of available addons.
-The name of each addon is linked to a separate page for that addon which offers more informations and configuration possibilities.
+The name of each addon is linked to a separate page for that addon which offers more information and configuration possibilities.
Also shown is the version of the addon and an indicator if the addon is currently active or not.
When you update your node and the addons they may have to be reloaded.
## DB Updates
Should the database structure of Friendica change, it will apply the changes automatically.
-In case you are suspecious that the update might not have worked, you can use this section of the admin panel to check the situation.
+In case you are suspecting the update might not have worked, you can use this section of the admin panel to check the situation.
## Inspect Queue
In the admin panel summary there are two numbers for the message queues.
The second number represents messages which could not be delivered and are queued for later retry.
-If this number goes sky-rocking you might ask yourself which receopiant is not receiving.
+If this number goes sky-rocking you might ask yourself which recipient is not receiving.
Behind the inspect queue section of the admin panel you will find a list of the messages that could not be delivered.
-The listing is sorted by the receipiant name so identifying potential broken communication lines should be simple.
+The listing is sorted by the recipient name so identifying potential broken communication lines should be simple.
These lines might be broken for various reasons.
The receiving end might be off-line, there might be a high system load and so on.
## Federation Statistics
The federation statistics page gives you a short summery of the nodes/servers/pods of the decentralized social network federation your node knows.
-These numbers are not compleate and only contain nodes from networks Friendica federates directly with.
+These numbers are not complete and only contain nodes from networks Friendica federates directly with.
## Delete Item
## Logs
-The log section of the admin panel is seperated into two pages.
+The log section of the admin panel is separated into two pages.
On the first, following the "log" link, you can configure how much Friendica shall log.
And on the second you can read the log.
You should not place your logs into any directory that is accessible from the web.
If you have to, and you are using the default configuration from Apache, you should choose a name for the logfile ending in ``.log`` or ``.out``.
-Should you use another web server, please make sure that you have the correct accessrules in place so that your log files are not accessible.
+Should you use another web server, please make sure that you have the correct access rules in place so that your log files are not accessible.
There are five different log levels: Normal, Trace, Debug, Data and All.
-Specifying different verbosities of information and data written out to the log file.
+Specifying different verbosity of information and data written out to the log file.
Normally you should not need to log at all.
The *DEBUG* level will show a good deal of information about system activity but will not include detailed data.
In the *ALL* level Friendica will log everything to the file.
**Known Issues**: The filename ``friendica.log`` can cause problems depending on your server configuration (see [issue 2209](https://github.com/friendica/friendica/issues/2209)).
-By default PHP warnings and error messages are supressed.
-If you want to enable those, you have to activate them in the ``config/local.ini.php`` file.
+By default PHP warnings and error messages are suppressed.
+If you want to enable those, you have to activate them in the ``config/local.config.php`` file.
Use the following settings to redirect PHP errors to a file.
Config:
## Diagnostics
-In this section of the admin panel you find two tools to investigate what Friendica sees for certain ressources.
+In this section of the admin panel you find two tools to investigate what Friendica sees for certain resources.
These tools can help to clarify communication problems.
For the *probe address* Friendica will display information for the address provided.
## DB Settings
-With the following settings, you specify the data base server, the username and passwort for Friendica and the database to use.
+With the following settings, you specify the data base server, the username and password for Friendica and the database to use.
- $db_host = 'your.db.host';
- $db_user = 'db_username';
- $db_pass = 'db_password';
- $db_data = 'database_name';
+ 'database' => [
+ 'hostname' => 'localhost',
+ 'username' => 'mysqlusername',
+ 'password' => 'mysqlpassword',
+ 'database' => 'mysqldatabasename',
+ 'charset' => 'utf8mb4',
+ ],
## Admin users
But you can expand the list of email addresses by any used email address you want.
Registration of new accounts with a listed email address is not possible.
- [config]
- admin_email = you@example.com, buddy@example.com
+ 'config' => [
+ 'admin_email' => 'you@example.com, buddy@example.com',
+ ],
## PHP Path
-Some of Friendicas processes are running in the background.
+Some of Friendica's processes are running in the background.
For this you need to specify the path to the PHP binary to be used.
- [config]
- php_path = {{$phpath}}
+ 'config' => [
+ 'php_path' => '/usr/bin/php',
+ ],
## Subdirectory configuration
-It is possible to install Friendica into a subdirectory of your webserver.
-We strongly discourage you from doing so, as this will break federation to other networks (e.g. Diaspora, GNU Socia, Hubzilla)
+It is possible to install Friendica into a subdirectory of your web server.
+We strongly discourage you from doing so, as this will break federation to other networks (e.g. Diaspora, GNU Social, Hubzilla)
Say you have a subdirectory for tests and put Friendica into a further subdirectory, the config would be:
- [system]
- urlpath = tests/friendica
+ 'system' => [
+ 'urlpath' => 'tests/friendica',
+ ],
## Other exceptions
-Furthermore there are some experimental settings, you can read-up in the [Config values that can only be set in config/local.ini.php](help/Config) section of the documentation.
+Furthermore there are some experimental settings, you can read-up in the [Config values that can only be set in config/local.config.php](help/Config) section of the documentation.
If you installed Friendica in the ``path/to/friendica`` folder:
1. Unpack the new Friendica archive in ``path/to/friendica_new``.
-2. Copy ``config/local.ini.php``, ``photo/`` and ``proxy/`` from ``path/to/friendica`` to ``path/to/friendica_new``.
+2. Copy ``config/local.config.php``, ``photo/`` and ``proxy/`` from ``path/to/friendica`` to ``path/to/friendica_new``.
3. Rename the ``path/to/friendica`` folder to ``path/to/friendica_old``.
4. Rename the ``path/to/friendica_new`` folder to ``path/to/friendica``.
5. Check your site. Note: it may go into maintenance mode to update the database schema.
9. To ultimately delete the virtual machine run
$> vagrant destroy
- $> rm /vagrant/config/local.ini.php
+ $> rm /vagrant/config/local.config.php
to make sure that you can start from scratch with another "vagrant up".
* friendica1, password friendica1
* friendica2, password friendica2 and so on until friendica5
* friendica1 is connected to all others. friendica1 has two groups: group1 with friendica2 and friendica4, group2 with friendica3 and friendica5.
- * friendica2 and friendica3 are conntected. friendica4 and friendica5 are connected.
+ * friendica2 and friendica3 are connected. friendica4 and friendica5 are connected.
For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/).
Ja, das ist möglich.
Es ist allerdings nicht möglich, eine Datenbank durch zwei Domains zu nutzen.
-Solange Du Deine config/local.ini.php allerdings so einrichtest, dass das System nicht versucht, eine Installation durchzuführen, kannst Du die richtige Config-Datei in include/$hostname/config/local.ini.php hinterlegen.
+Solange Du Deine config/local.config.php allerdings so einrichtest, dass das System nicht versucht, eine Installation durchzuführen, kannst Du die richtige Config-Datei in include/$hostname/config/local.config.php hinterlegen.
Alle Cache-Aspekte und der Zugriffsschutz können pro Instanz konfiguriert werden.
<a name="sources"></a>
<a name="adminaccount1"></a>
### Ich habe meine E-Mail Adresse geändern und jetzt ist das Admin Panel verschwunden?
-Bitte aktualisiere deine E-Mail Adresse in der <tt>config/local.ini.php</tt> Datei.
+Bitte aktualisiere deine E-Mail Adresse in der <tt>config/local.config.php</tt> Datei.
<a name="adminaccount2"></a>
### Kann es mehr als einen Admin auf einer Friendica Instanz geben?
Ja.
-Du kannst in der <tt>config/local.ini.php</tt> Datei mehrere E-Mail Adressen auflisten.
+Du kannst in der <tt>config/local.config.php</tt> Datei mehrere E-Mail Adressen auflisten.
Die aufgelisteten Adressen werden mit Kommata von einander getrennt.
<a name="dbupdate">
* [Konnektoren (Connectors) installieren (Twitter/GNU Social)](help/Installing-Connectors)
* [Installation eines ejabberd Servers (XMPP-Chat) mit synchronisierten Anmeldedaten](help/install-ejabberd) (EN)
* [Betreibe deine Seite mit einem SSL-Zertifikat](help/SSL)
-* [Konfigurationswerte, die nur in der config/local.ini.php gesetzt werden können](help/Config) (EN)
+* [Konfigurationswerte, die nur in der config/local.config.php gesetzt werden können](help/Config) (EN)
* [Performance verbessern](help/Improve-Performance)
* [Administration Werkzeuge](help/tools) (EN)
Falls du einen Port für die Datenbankverbindung angeben musst, kannst du diesen in der Host-Eingabe Zeile angeben.
*Wenn* die manuelle Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende:
-* "config/local.ini.php" existiert ... wenn nicht, bearbeite die „config/local-sample.ini.php“ und ändere die Systemeinstellungen. Benenne sie um in „config/local.ini.php".
+* "config/local.config.php" existiert ... wenn nicht, bearbeite die „config/local-sample.config.php“ und ändere die Systemeinstellungen. Benenne sie um in „config/local.config.php".
* die Datenbank beinhaltet Daten. ... wenn nicht, importiere den Inhalt der Datei "database.sql" mit phpmyadmin oder per mysql-Kommandozeile.
Besuche deine Seite an diesem Punkt wieder und registriere deinen persönlichen Account.
Alle Registrierungsprobleme sollten automatisch behebbar sein.
Wenn du irgendwelche **kritischen** Fehler zu diesen Zeitpunkt erhalten solltest, deutet das darauf hin, dass die Datenbank nicht korrekt installiert wurde.
-Du kannst bei Bedarf die Datei config/local.ini.php verschieben/umbenennen und die Datenbank leeren (als „Dropping“ bezeichnet), so dass du mit einem sauberen System neu starten kannst.
+Du kannst bei Bedarf die Datei config/local.config.php verschieben/umbenennen und die Datenbank leeren (als „Dropping“ bezeichnet), so dass du mit einem sauberen System neu starten kannst.
### Option B: Starte das automatische Installationsscript
Es existieren folgende Varianten zur automatischen Installation von Friendica:
-- Eine vorgefertigte Konfigurationsdatei erstellen (z.B. `prepared.ini.php`)
+- Eine vorgefertigte Konfigurationsdatei erstellen (z.B. `prepared.config.php`)
- Verwendung von Umgebungsvariablen (z.B. `MYSQL_HOST`)
- Verwendung von Optionen (z.B. `--dbhost <host>`)
bin/console autoinstall -a
*Wenn* die automatisierte Installation aus irgendeinem Grund fehlschlägt, dann prüfe das Folgende:
-* Existiert die `config/local.ini.php`? Falls ja, wird die automatisierte Installation nicht gestartet.
-* Sind Einstellungen in der `config/local.ini.php` korrekt? Falls nicht, bitte bearbeite diese Datei erneut.
+* Existiert die `config/local.config.php`? Falls ja, wird die automatisierte Installation nicht gestartet.
+* Sind Einstellungen in der `config/local.config.php` korrekt? Falls nicht, bitte bearbeite diese Datei erneut.
* Ist die leere MySQL-Datenbank erstellt? Falls nicht, erstelle diese.
#### B.1: Konfigurationsdatei
-Für diese Variante muss ein Konfigurationsdatei bereits vor der Installation fertig definiert sein (z.B. [local-sample.ini.php](config/local-sample.ini.php).
+Für diese Variante muss ein Konfigurationsdatei bereits vor der Installation fertig definiert sein (z.B. [local-sample.config.php](config/local-sample.config.php).
Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Befehl aus:
- bin/console autoinstall -f <prepared.ini.php>
+ bin/console autoinstall -f <prepared.config.php>
#### B.2: Umgebungsvariablen
**Datenbank Einstellungen**
-Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch in `config/local.ini.php` gespeichert!
+Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch in `config/local.config.php` gespeichert!
- `MYSQL_HOST` Der Host der MySQL/MariaDB Datenbank
- `MYSQL_PORT` Der Port der MySQL/MariaDB Datenbank
**Friendica Einstellungen**
Diese Umgebungsvariablen können nicht während des normalen Friendica Betriebs verwendet werden.
-Sie werden stattdessen direkt in `config/local.ini.php` gespeichert.
+Sie werden stattdessen direkt in `config/local.config.php` gespeichert.
- `FRIENDICA_PHP_PATH` Der Pfad zur PHP-Datei
- `FRIENDICA_ADMIN_MAIL` Die Admin E-Mail Adresse dieses Friendica Knotens (wird auch für den Admin-Zugang benötigt)
#### B.3: Optionen
-Alle Optionen werden in `config/local.ini.php` gespeichert und überschreiben etwaige, zugehörige Umgebungsvariablen.
+Alle Optionen werden in `config/local.config.php` gespeichert und überschreiben etwaige, zugehörige Umgebungsvariablen.
- `-H|--dbhost <host>` Der Host der MySQL/MariaDB Datenbank (env `MYSQL_HOST`)
- `-p|--dbport <port>` Der Port der MySQL/MariaDB Datenbank (env `MYSQL_PORT`)
Sei es nun ein Hardwareversagen oder eine kaputte Datenbank.
Deshalb solltest du dir, nachdem die Installation deines Friendica Knotens abgeschlossen ist, einen Backup Plan erstellen.
-Die wichtigste Datei ist die `config/local.ini.php` im Stammverzeichnis deiner Friendica Installation.
+Die wichtigste Datei ist die `config/local.config.php` im Stammverzeichnis deiner Friendica Installation.
Und da alle Daten in der Datenbank gespeichert werden, solltest du einen nicht all zu alten Dump der Friendica Datenbank zur Hand haben, solltest du deinen Knoten wieder herstellen müssen.
Dieses kann über das Administrationsmenü erstellt werden.
Jeder der Konnektoren benötigt zudem einen API-Schlüssel vom Service, der verbunden werden soll.
-Einige Erweiterung erlaube es, diese Informationen auf den Administrationsseiten einzustellen, wohingegen andere eine direkte Bearbeitung der Konfigurationsdatei "config/local.ini.php" erfordern.
+Einige Erweiterung erlaube es, diese Informationen auf den Administrationsseiten einzustellen, wohingegen andere eine direkte Bearbeitung der Konfigurationsdatei "config/local.config.php" erfordern.
Der Weg, um diese Schlüssel zu erhalten, variiert stark, jedoch brauchen fast alle einen bestehenden Account im gewünschten Service.
Einmal installiert, können diese Schlüssel von allen Seitennutzern genutzt werden.
Registriere deine Friendica-Seite als "Client"-Anwendung mit "Read&Write"-Zugriff. Wir benötigen "Twitter als Login" nicht. Sobald du deine Anwendung installiert hast, erhältst du das Schlüsselpaar für deine Seite.
-Trage dieses Schlüsselpaar in deine globale "config/local.ini.php"-Datei ein.
+Trage dieses Schlüsselpaar in deine globale "config/local.config.php"-Datei ein.
```
[twitter]
##### Einladungen
Zusätzlich zu den oben genannten Möglichkeiten, kann die Registrierung eines neuen Nutzerkontos an eine Einladung durch einen bestehenden Nutzer gekoppelt werden.
-Hierzu muss in der [config/local.ini.php](/help/Config) Datei die Option `invitation_only` aktiviert und als Registrierungsmethode entweder *Offen* oder *Bedarf der Zustimmung* gewählt werden.
+Hierzu muss in der [config/local.config.php](/help/Config) Datei die Option `invitation_only` aktiviert und als Registrierungsmethode entweder *Offen* oder *Bedarf der Zustimmung* gewählt werden.
#### Namen auf Vollständigkeit überprüfen
**Bekannte Probleme**: Der Dateiname `friendica.log` kann bei speziellen Server Konfigurationen zu Problemen führen (siehe [issue 2209](https://github.com/friendica/friendica/issues/2209)).
Normalerweise werden Fehler- und Warnmeldungen von PHP unterdrückt.
-Wenn du sie aktivieren willst, musst du folgendes in der `config/local.ini.php` Datei eintragen um die Meldungen in die Datei `php.out` zu speichern
+Wenn du sie aktivieren willst, musst du folgendes in der `config/local.config.php` Datei eintragen um die Meldungen in die Datei `php.out` zu speichern
error_reporting(E_ERROR | E_WARNING | E_PARSE );
ini_set('error_log','php.out');
Mit den folgenden Einstellungen kannst du die Zugriffsdaten für den Datenbank Server festlegen.
- $db_host = 'your.db.host';
- $db_user = 'db_username';
- $db_pass = 'db_password';
- $db_data = 'database_name';
+ 'database' => [
+ 'hostname' => 'localhost',
+ 'username' => 'mysqlusername',
+ 'password' => 'mysqlpassword',
+ 'database' => 'mysqldatabasename',
+ 'charset' => 'utf8mb4',
+ ],
Sollten alle der folgenden Environment-Variablen gesetzt sein, wird Friendica diese anstatt der vorher konfigurierten Werte nutzen.
Die Liste der E-Mail Adressen kann aber einfach erweitert werden.
Mit keiner der angegebenen E-Mail Adressen können weitere Accounts registriert werden.
- [config]
- admin_email = you@example.com, buddy@example.com
+ 'config' => [
+ 'admin_email' => 'you@example.com, buddy@example.com',
+ ],
## PHP Pfad
Einige Prozesse von Friendica laufen im Hintergrund.
Für diese Prozesse muss der Pfad zu der PHP Version gesetzt sein, die verwendet werden soll.
- [config]
- php_path = {{$phpath}}
+ 'config' => [
+ 'php_path' => '/usr/bin/php',
+ ],
## Unterverzeichnis Konfiguration
Wir raten allerdings dringen davon ab, da es die Interoperabilität mit anderen Netzwerken (z.B. Diaspora, GNU Social, Hubzilla) verhindert.
Mal angenommen, du hast ein Unterverzeichnis tests und willst Friendica in ein weiteres Unterverzeichnis installieren, dann lautet die Konfiguration hierfür:
- [system]
- urlpath = tests/friendica
+ 'system' => [
+ 'urlpath' => 'tests/friendica',
+ ],
## Weitere Ausnahmen
-Es gibt noch einige experimentelle Einstellungen, die nur in der ``config/local.ini.php`` Datei konfiguriert werden können.
-Im [Konfigurationswerte, die nur in der config/local.ini.php gesetzt werden können (EN)](help/Config) Artikel kannst du mehr darüber erfahren.
+Es gibt noch einige experimentelle Einstellungen, die nur in der ``config/local.config.php`` Datei konfiguriert werden können.
+Im [Konfigurationswerte, die nur in der config/local.config.php gesetzt werden können (EN)](help/Config) Artikel kannst du mehr darüber erfahren.
// Legacy config file warning
if (file_exists('.htconfig.php')) {
$showwarning = true;
- $warningtext[] = L10n::t('Friendica\'s configuration now is stored in config/local.ini.php, please copy config/local-sample.ini.php and move your config from <code>.htconfig.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', $a->getBaseURL() . '/help/Config');
+ $warningtext[] = L10n::t('Friendica\'s configuration now is stored in config/local.config.php, please copy config/local-sample.config.php and move your config from <code>.htconfig.php</code>. See <a href="%s">the Config help page</a> for help with the transition.', $a->getBaseURL() . '/help/Config');
}
// Check server vitality
set_include_path(
get_include_path() . PATH_SEPARATOR
. $this->getBasePath() . DIRECTORY_SEPARATOR . 'include' . PATH_SEPARATOR
- . $this->getBasePath(). DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
+ . $this->getBasePath() . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR
. $this->getBasePath());
if (!empty($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'pagename=') === 0) {
* Load the configuration files
*
* First loads the default value for all the configuration keys, then the legacy configuration files, then the
- * expected local.ini.php
+ * expected local.config.php
*/
private function loadConfigFiles()
{
- $this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.ini.php');
- $this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'settings.ini.php');
+ $this->loadConfigFile($this->getBasePath() . '/config/defaults.config.php');
+ $this->loadConfigFile($this->getBasePath() . '/config/settings.config.php');
// Legacy .htconfig.php support
- if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php')) {
+ if (file_exists($this->getBasePath() . '/.htpreconfig.php')) {
$a = $this;
- include $this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php';
+ include $this->getBasePath() . '/.htpreconfig.php';
}
// Legacy .htconfig.php support
- if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . '.htconfig.php')) {
+ if (file_exists($this->getBasePath() . '/.htconfig.php')) {
$a = $this;
- include $this->getBasePath() . DIRECTORY_SEPARATOR . '.htconfig.php';
+ include $this->getBasePath() . '/.htconfig.php';
$this->setConfigValue('database', 'hostname', $db_host);
$this->setConfigValue('database', 'username', $db_user);
}
}
- if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')) {
- $this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php', true);
+ if (file_exists($this->getBasePath() . '/config/local.config.php')) {
+ $this->loadConfigFile($this->getBasePath() . '/config/local.config.php', true);
+ } elseif (file_exists($this->getBasePath() . '/config/local.ini.php')) {
+ $this->loadINIConfigFile($this->getBasePath() . '/config/local.ini.php', true);
}
}
/**
- * Tries to load the specified configuration file into the App->config array.
+ * Tries to load the specified legacy configuration file into the App->config array.
* Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
*
- * The config format is INI and the template for configuration files is the following:
- *
- * <?php return <<<INI
- *
- * [section]
- * key = value
- *
- * INI;
- * // Keep this line
- *
+ * @deprecated since version 2018.12
* @param string $filepath
* @param bool $overwrite Force value overwrite if the config key already exists
* @throws Exception
*/
- public function loadConfigFile($filepath, $overwrite = false)
+ public function loadINIConfigFile($filepath, $overwrite = false)
{
if (!file_exists($filepath)) {
- throw new Exception('Error parsing non-existent config file ' . $filepath);
+ throw new Exception('Error parsing non-existent INI config file ' . $filepath);
}
$contents = include($filepath);
$config = parse_ini_string($contents, true, INI_SCANNER_TYPED);
if ($config === false) {
- throw new Exception('Error parsing config file ' . $filepath);
+ throw new Exception('Error parsing INI config file ' . $filepath);
}
- foreach ($config as $category => $values) {
- foreach ($values as $key => $value) {
- if ($overwrite) {
- $this->setConfigValue($category, $key, $value);
- } else {
- $this->setDefaultConfigValue($category, $key, $value);
- }
- }
+ $this->loadConfigArray($config, $overwrite);
+ }
+
+ /**
+ * Tries to load the specified configuration file into the App->config array.
+ * Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
+ *
+ * The config format is PHP array and the template for configuration files is the following:
+ *
+ * <?php return [
+ * 'section' => [
+ * 'key' => 'value',
+ * ],
+ * ];
+ *
+ * @param string $filepath
+ * @param bool $overwrite Force value overwrite if the config key already exists
+ * @throws Exception
+ */
+ public function loadConfigFile($filepath, $overwrite = false)
+ {
+ if (!file_exists($filepath)) {
+ throw new Exception('Error loading non-existent config file ' . $filepath);
+ }
+
+ $config = include($filepath);
+
+ if (!is_array($config)) {
+ throw new Exception('Error loading config file ' . $filepath);
}
+
+ $this->loadConfigArray($config, $overwrite);
}
/**
* Loads addons configuration files
*
- * First loads all activated addons default configuration throught the load_config hook, then load the local.ini.php
+ * First loads all activated addons default configuration through the load_config hook, then load the local.config.php
* again to overwrite potential local addon configuration.
*/
private function loadAddonConfig()
{
// Loads addons default config
- Core\Addon::callHooks('load_config');
+ Core\Hook::callAll('load_config');
// Load the local addon config file to overwritten default addon config values
- if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'addon.ini.php')) {
- $this->loadConfigFile($this->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'addon.ini.php', true);
+ if (file_exists($this->getBasePath() . '/config/addon.config.php')) {
+ $this->loadConfigFile($this->getBasePath() . '/config/addon.config.php', true);
+ } elseif (file_exists($this->getBasePath() . '/config/addon.ini.php')) {
+ $this->loadINIConfigFile($this->getBasePath() . '/config/addon.ini.php', true);
+ }
+ }
+
+ /**
+ * Tries to load the specified configuration array into the App->config array.
+ * Doesn't overwrite previously set values by default to prevent default config files to supersede DB Config.
+ *
+ * @param array $config
+ * @param bool $overwrite Force value overwrite if the config key already exists
+ */
+ private function loadConfigArray(array $config, $overwrite = false)
+ {
+ foreach ($config as $category => $values) {
+ foreach ($values as $key => $value) {
+ if ($overwrite) {
+ $this->setConfigValue($category, $key, $value);
+ } else {
+ $this->setDefaultConfigValue($category, $key, $value);
+ }
+ }
}
}
$this->urlPath = trim($parsed['path'], '\\/');
}
- if (file_exists($this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php')) {
- include $this->getBasePath() . DIRECTORY_SEPARATOR . '.htpreconfig.php';
+ if (file_exists($this->getBasePath() . '/.htpreconfig.php')) {
+ include $this->getBasePath() . '/.htpreconfig.php';
}
if (Core\Config::get('config', 'hostname') != '') {
$this->mode = 0;
- if (!file_exists($this->basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')
- && !file_exists($this->basepath . DIRECTORY_SEPARATOR . '.htconfig.php')) {
+ if (!file_exists($this->basepath . '/config/local.config.php')
+ && !file_exists($this->basepath . '/config/local.ini.php')
+ && !file_exists($this->basepath . '/.htconfig.php')) {
return;
}
$this->in_db[$cat][$k] = true;
return $value;
} elseif (isset($a->config[$cat][$k])) {
- // Assign the value (mostly) from config/local.ini.php file to the cache
+ // Assign the value (mostly) from config/local.config.php file to the cache
$this->cache[$cat][$k] = $a->config[$cat][$k];
$this->in_db[$cat][$k] = false;
return $a->config[$cat][$k];
} elseif (isset($a->config[$k])) {
- // Assign the value (mostly) from config/local.ini.php file to the cache
+ // Assign the value (mostly) from config/local.config.php file to the cache
$this->cache[$k] = $a->config[$k];
$this->in_db[$k] = false;
bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f]
Description
- Installs Friendica with data based on the local.ini.php file or environment variables
+ Installs Friendica with data based on the local.config.php file or environment variables
Notes
Not checking .htaccess/URL-Rewrite during CLI installation.
-h|--help|-? Show help information
-v Show more debug information.
-a All setup checks are required (except .htaccess)
- -f|--file <config> prepared config file (e.g. "config/local.ini.php" itself) which will override every other config option - except the environment variables)
+ -f|--file <config> prepared config file (e.g. "config/local.config.php" itself) which will override every other config option - except the environment variables)
-s|--savedb Save the DB credentials to the file (if environment variables is used)
-H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST)
-p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT)
FRIENDICA_LANG The langauge of Friendica
Examples
- bin/console autoinstall -f 'input.ini.php
- Installs Friendica with the prepared 'input.ini.php' file
+ bin/console autoinstall -f 'input.config.php
+ Installs Friendica with the prepared 'input.config.php' file
bin/console autoinstall --savedb
- Installs Friendica with environment variables and saves them to the 'config/local.ini.php' file
+ Installs Friendica with environment variables and saves them to the 'config/local.config.php' file
bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica
Installs Friendica with a local mysql database with credentials
$config_file = $this->getOption(['f', 'file']);
if (!empty($config_file)) {
- if ($config_file != 'config' . DIRECTORY_SEPARATOR . 'local.ini.php') {
+ if ($config_file != 'config' . DIRECTORY_SEPARATOR . 'local.config.php') {
// Copy config file
$this->out("Copying config file...\n");
- if (!copy($a->getBasePath() . DIRECTORY_SEPARATOR . $config_file, $a->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php')) {
- throw new RuntimeException("ERROR: Saving config file failed. Please copy '$config_file' to '" . $a->getBasePath() . "'" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "local.ini.php' manually.\n");
+ if (!copy($a->getBasePath() . DIRECTORY_SEPARATOR . $config_file, $a->getBasePath() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.config.php')) {
+ throw new RuntimeException("ERROR: Saving config file failed. Please copy '$config_file' to '" . $a->getBasePath() . "'" . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "local.config.php' manually.\n");
}
}
Theme::install(Config::get('system', 'theme'));
$this->out(" Complete\n\n");
} else {
- $this->out(" Theme setting is empty. Please check the file 'config/local.ini.php'\n\n");
+ $this->out(" Theme setting is empty. Please check the file 'config/local.config.php'\n\n");
}
$this->out("\nInstallation is finished\n");
Sets the value of the provided key in the category
Notes:
- Setting config entries which are manually set in config/local.ini.php may result in
+ Setting config entries which are manually set in config/local.config.php may result in
conflict between database settings and the manual startup settings.
Options
/**
* Executes the installation of Friendica in the given environment.
- * - Creates `config/local.ini.php`
+ * - Creates `config/local.config.php`
* - Installs Database Structure
*
* @param string $phppath Path to the PHP-Binary (optional, if not set e.g. 'php' or '/usr/bin/php')
*/
public function createConfig($phppath, $urlpath, $dbhost, $dbuser, $dbpass, $dbdata, $timezone, $language, $adminmail, $basepath)
{
- $tpl = Renderer::getMarkupTemplate('local.ini.tpl');
+ $tpl = Renderer::getMarkupTemplate('local.config.tpl');
$txt = Renderer::replaceMacros($tpl, [
'$phpath' => $phppath,
'$dbhost' => $dbhost,
'$adminmail' => $adminmail,
]);
- $result = file_put_contents($basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.ini.php', $txt);
+ $result = file_put_contents($basepath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'local.config.php', $txt);
if (!$result) {
- $this->addCheck(L10n::t('The database configuration file "config/local.ini.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'), false, false, htmlentities($txt, ENT_COMPAT, 'UTF-8'));
+ $this->addCheck(L10n::t('The database configuration file "config/local.config.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.'), false, false, htmlentities($txt, ENT_COMPAT, 'UTF-8'));
}
return $result;
}
/**
- * "config/local.ini.php" - Check
+ * "config/local.config.php" - Check
*
- * Checks if it's possible to create the "config/local.ini.php"
+ * Checks if it's possible to create the "config/local.config.php"
*
* @return bool false if something required failed
*/
{
$status = true;
$help = "";
- if ((file_exists('config/local.ini.php') && !is_writable('config/local.ini.php')) ||
- (!file_exists('config/local.ini.php') && !is_writable('.'))) {
+ if ((file_exists('config/local.config.php') && !is_writable('config/local.config.php')) ||
+ (!file_exists('config/local.config.php') && !is_writable('.'))) {
$status = false;
- $help = L10n::t('The web installer needs to be able to create a file called "local.ini.php" in the "config" folder of your web server and it is unable to do so.') . EOL;
+ $help = L10n::t('The web installer needs to be able to create a file called "local.config.php" in the "config" folder of your web server and it is unable to do so.') . EOL;
$help .= L10n::t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . EOL;
- $help .= L10n::t('At the end of this procedure, we will give you a text to save in a file named local.ini.php in your Friendica "config" folder.') . EOL;
+ $help .= L10n::t('At the end of this procedure, we will give you a text to save in a file named local.config.php in your Friendica "config" folder.') . EOL;
$help .= L10n::t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.') . EOL;
}
- $this->addCheck(L10n::t('config/local.ini.php is writable'), $status, false, $help);
+ $this->addCheck(L10n::t('config/local.config.php is writable'), $status, false, $help);
// Local INI File is not required
return true;
const UPDATE_FAILED = 2; // Database check failed
/**
- * Database structure definition loaded from config/dbstructure.php
+ * Database structure definition loaded from config/dbstructure.config.php
*
* @var array
*/
}
/**
- * Loads the database structure definition from the config/dbstructure.php file.
+ * Loads the database structure definition from the config/dbstructure.config.php file.
* On first pass, defines DB_UPDATE_VERSION constant.
*
- * @see config/dbstructure.php
+ * @see config/dbstructure.config.php
* @param boolean $with_addons_structure Whether to tack on addons additional tables
* @return array
* @throws Exception
if (!self::$definition) {
$a = \Friendica\BaseObject::getApp();
- $filename = $a->getBasePath() . '/config/dbstructure.php';
+ $filename = $a->getBasePath() . '/config/dbstructure.config.php';
if (!is_readable($filename)) {
- throw new Exception('Missing database structure config file config/dbstructure.php');
+ throw new Exception('Missing database structure config file config/dbstructure.config.php');
}
$definition = require $filename;
if (!$definition) {
- throw new Exception('Corrupted database structure config file config/dbstructure.php');
+ throw new Exception('Corrupted database structure config file config/dbstructure.config.php');
}
self::$definition = $definition;
// create a virtual directory and copy all needed files and folders to it
$this->root = vfsStream::setup('friendica', null, $structure);
- $this->setConfigFile('config.ini.php');
- $this->setConfigFile('settings.ini.php');
- $this->setConfigFile('local.ini.php');
- $this->setConfigFile('dbstructure.php');
+ $this->setConfigFile('defaults.config.php');
+ $this->setConfigFile('settings.config.php');
+ $this->setConfigFile('local.config.php');
+ $this->setConfigFile('dbstructure.config.php');
}
/**
{
$mode = new Mode($this->root->url());
- $this->assertTrue($this->root->hasChild('config/local.ini.php'));
+ $this->assertTrue($this->root->hasChild('config/local.config.php'));
- $this->delConfigFile('local.ini.php');
+ $this->delConfigFile('local.config.php');
- $this->assertFalse($this->root->hasChild('config/local.ini.php'));
+ $this->assertFalse($this->root->hasChild('config/local.config.php'));
$mode->determine();
{
parent::setUp();
- if ($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.ini.php')) {
+ if ($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php')) {
$this->root->getChild('config')
- ->removeChild('local.ini.php');
+ ->removeChild('local.config.php');
}
$this->db_host = getenv('MYSQL_HOST');
}
/**
- * Creates the arguments which is asserted to be passed to 'replaceMacros()' for creating the local.ini.php
+ * Creates the arguments which is asserted to be passed to 'replaceMacros()' for creating the local.config.php
*
* @param bool $withDb if true, DB will get saved too
*
$this->mockUpdate([false, true, true], null, 1);
$config = <<<CONF
-<?php return <<<INI
-
-[database]
-hostname =
-username =
-password =
-database =
-charset = utf8mb4
-
-
-; ****************************************************************
-; The configuration below will be overruled by the admin panel.
-; Changes made below will only have an effect if the database does
-; not contain any configuration for the friendica system.
-; ****************************************************************
-
-[config]
-admin_email =
-
-sitename = Friendica Social Network
-
-register_policy = REGISTER_OPEN
-register_text =
-
-[system]
-default_timezone = UTC
-
-language = en
-INI;
-// Keep this line
+<?php
+// Local configuration
+
+// If you're unsure about what any of the config keys below do, please check the config/defaults.config.php for detailed
+// documentation of their data type and behavior.
+
+return [
+ 'database' => [
+ 'hostname' => '',
+ 'username' => '',
+ 'password' => '',
+ 'database' => '',
+ 'charset' => 'utf8mb4',
+ ],
+
+ // ****************************************************************
+ // The configuration below will be overruled by the admin panel.
+ // Changes made below will only have an effect if the database does
+ // not contain any configuration for the friendica system.
+ // ****************************************************************
+
+ 'config' => [
+ 'admin_email' => '',
+ 'sitename' => 'Friendica Social Network',
+ 'register_policy' => REGISTER_OPEN,
+ 'register_text' => '',
+ ],
+ 'system' => [
+ 'default_timezone' => 'UTC',
+ 'language' => 'en',
+ ],
+];
CONF;
- vfsStream::newFile('prepared.ini.php')
+ vfsStream::newFile('prepared.config.php')
->at($this->root)
->setContent($config);
$console = new AutomaticInstallation($this->consoleArgv);
- $console->setOption('f', 'prepared.ini.php');
+ $console->setOption('f', 'prepared.config.php');
$txt = $this->dumpExecute($console);
$this->assertFinished($txt, false, true);
- $this->assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.ini.php'));
+ $this->assertTrue($this->root->hasChild('config' . DIRECTORY_SEPARATOR . 'local.config.php'));
}
/**
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
- $this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1);
+ $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1);
$this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
- $this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1);
+ $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1);
$this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
$this->mockExistsTable('user', false, 1);
$this->mockUpdate([false, true, true], null, 1);
- $this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1);
+ $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(true), '', 1);
$console = new AutomaticInstallation($this->consoleArgv);
{
$this->mockConnect(false, 1);
- $this->mockGetMarkupTemplate('local.ini.tpl', 'testTemplate', 1);
+ $this->mockGetMarkupTemplate('local.config.tpl', 'testTemplate', 1);
$this->mockReplaceMacros('testTemplate', $this->createArgumentsForMacro(false), '', 1);
$this->assertTrue(putenv('FRIENDICA_ADMIN_MAIL=admin@friendica.local'));
bin/console autoinstall [-h|--help|-?] [-v] [-a] [-f]
Description
- Installs Friendica with data based on the local.ini.php file or environment variables
+ Installs Friendica with data based on the local.config.php file or environment variables
Notes
Not checking .htaccess/URL-Rewrite during CLI installation.
-h|--help|-? Show help information
-v Show more debug information.
-a All setup checks are required (except .htaccess)
- -f|--file <config> prepared config file (e.g. "config/local.ini.php" itself) which will override every other config option - except the environment variables)
+ -f|--file <config> prepared config file (e.g. "config/local.config.php" itself) which will override every other config option - except the environment variables)
-s|--savedb Save the DB credentials to the file (if environment variables is used)
-H|--dbhost <host> The host of the mysql/mariadb database (env MYSQL_HOST)
-p|--dbport <port> The port of the mysql/mariadb database (env MYSQL_PORT)
FRIENDICA_LANG The langauge of Friendica
Examples
- bin/console autoinstall -f 'input.ini.php
- Installs Friendica with the prepared 'input.ini.php' file
+ bin/console autoinstall -f 'input.config.php
+ Installs Friendica with the prepared 'input.config.php' file
bin/console autoinstall --savedb
- Installs Friendica with environment variables and saves them to the 'config/local.ini.php' file
+ Installs Friendica with environment variables and saves them to the 'config/local.config.php' file
bin/console autoinstall -h localhost -p 3365 -U user -P passwort1234 -d friendica
Installs Friendica with a local mysql database with credentials
Sets the value of the provided key in the category
Notes:
- Setting config entries which are manually set in config/local.ini.php may result in
+ Setting config entries which are manually set in config/local.config.php may result in
conflict between database settings and the manual startup settings.
Options
*/
public function testCheckLocalIni()
{
- $this->assertTrue($this->root->hasChild('config/local.ini.php'));
+ $this->assertTrue($this->root->hasChild('config/local.config.php'));
$install = new Installer();
$this->assertTrue($install->checkLocalIni());
- $this->delConfigFile('local.ini.php');
+ $this->delConfigFile('local.config.php');
- $this->assertFalse($this->root->hasChild('config/local.ini.php'));
+ $this->assertFalse($this->root->hasChild('config/local.config.php'));
$install = new Installer();
$this->assertTrue($install->checkLocalIni());
* This function is responsible for doing post update changes to the data
* (not the structure) in the database.
*
- * Database structure changes are done in config/dbstructure.php
+ * Database structure changes are done in config/dbstructure.config.php
*
* If there is a need for a post process to a structure change, update this file
* by adding a new function at the end with the number of the new DB_UPDATE_VERSION.
*
* 1. Create a function "update_4712()" here in the update.php
* 2. Apply the needed structural changes in config/dbStructure.php
- * 3. Set DB_UPDATE_VERSION in config/dbstructure.php to 4712.
+ * 3. Set DB_UPDATE_VERSION in config/dbstructure.config.php to 4712.
*
* If you need to run a script before the database update, name the function "pre_update_4712()"
*/
--- /dev/null
+<?php\r
+\r
+// Local configuration\r
+\r
+/* If automatic system installation fails:\r
+ *\r
+ * Copy this file to local.config.php\r
+ *\r
+ * Why local.config.php? Because it contains sensitive information which could\r
+ * give somebody complete control of your database. Apache's default\r
+ * configuration will interpret any .php file as a script and won't show the values\r
+ *\r
+ * Then set the following for your MySQL installation\r
+ */\r
+\r
+return [\r
+ 'database' => [\r
+ 'hostname' => 'localhost',\r
+ 'username' => 'mysqlusername',\r
+ 'password' => 'mysqlpassword',\r
+ 'database' => 'mysqldatabasename',\r
+ 'charset' => 'utf8mb4',\r
+ ],\r
+\r
+ // ****************************************************************\r
+ // The configuration below will be overruled by the admin panel.\r
+ // Changes made below will only have an effect if the database does\r
+ // not contain any configuration for the friendica system.\r
+ // ****************************************************************\r
+\r
+ 'config' => [\r
+ 'admin_email' => 'admin@friendica.local',\r
+ 'sitename' => 'Friendica Social Network',\r
+ 'register_policy' => REGISTER_OPEN,\r
+ 'register_text' => '',\r
+ ],\r
+ 'system' => [\r
+ 'default_timezone' => 'UTC',\r
+ 'language' => 'en',\r
+ ],\r
+];\r
+++ /dev/null
-<?php return <<<INI
-
-; If automatic system installation fails:
-
-; Copy this file to local.ini.php
-
-; Why local.ini.php? Because it contains sensitive information which could
-; give somebody complete control of your database. Apache's default
-; configuration will interpret any .php file as a script and won't show the values
-
-; Then set the following for your MySQL installation
-
-[database]
-hostname = localhost
-username = friendica
-password = friendica
-database = friendica
-charset = utf8mb4
-
-
-; ****************************************************************
-; The configuration below will be overruled by the admin panel.
-; Changes made below will only have an effect if the database does
-; not contain any configuration for the friendica system.
-; ****************************************************************
-
-[config]
-admin_email = admin@friendica.local
-
-sitename = Friendica Social Network
-
-register_policy = REGISTER_OPEN
-register_text =
-
-[system]
-default_timezone = UTC
-
-language = en
-
-INI;
-// Keep this line
\ No newline at end of file
--- /dev/null
+<?php
+
+// Local configuration
+
+// If you're unsure about what any of the config keys below do, please check the config/defaults.config.php for detailed
+// documentation of their data type and behavior.
+
+return [
+ 'database' => [
+ 'hostname' => '{{$dbhost}}',
+ 'username' => '{{$dbuser}}',
+ 'password' => '{{$dbpass}}',
+ 'database' => '{{$dbdata}}',
+ 'charset' => 'utf8mb4',
+ ],
+
+ // ****************************************************************
+ // The configuration below will be overruled by the admin panel.
+ // Changes made below will only have an effect if the database does
+ // not contain any configuration for the friendica system.
+ // ****************************************************************
+
+ 'config' => [
+ 'php_path' => '{{$phpath}}',
+ 'admin_email' => '{{$adminmail}}',
+ 'sitename' => 'Friendica Social Network',
+ 'register_policy' => REGISTER_OPEN,
+ 'max_import_size' => 200000,
+ ],
+ 'system' => [
+ 'urlpath' => '{{$urlpath}}',
+ 'default_timezone' => '{{$timezone}}',
+ 'language' => '{{$language}}',
+ ],
+];
+++ /dev/null
-<?php return <<<INI
-
-; If you're unsure about what any of the config keys below do, please check the config/defaults.ini.php for detailed
-; documentation of their data type and behavior.
-
-[database]
-hostname = "{{$dbhost}}"
-username = "{{$dbuser}}"
-password = "{{$dbpass}}"
-database = "{{$dbdata}}"
-charset = utf8mb4
-
-; ****************************************************************
-; Some config values below can be overruled from the admin settings
-; ****************************************************************
-
-[config]
-php_path = "{{$phpath}}"
-
-admin_email = "{{$adminmail}}"
-
-sitename = Friendica Social Network
-
-register_policy = REGISTER_OPEN
-register_text =
-
-max_import_size = 200000
-
-[system]
-urlpath = "{{$urlpath}}"
-
-default_timezone = "{{$timezone}}"
-
-language = "{{$language}}"
-
-allowed_themes = vier,quattro,duepuntozero,smoothly,frio
-theme = vier
-
-allowed_link_protocols[0] = ftp
-allowed_link_protocols[1] = ftps
-allowed_link_protocols[2] = mailto
-allowed_link_protocols[3] = cid
-allowed_link_protocols[4] = gopher
-
-maximagesize = 800000
-
-no_regfullname = true
-
-block_local_dir = false
-
-directory = https://dir.friendica.social
-
-auth_cookie_lifetime = 7
-
-INI;
-// Keep this line
\ No newline at end of file