]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6199 from MrPetovan/task/move-config-to-php-array
authorMichael Vogel <icarus@dabo.de>
Mon, 26 Nov 2018 22:57:56 +0000 (23:57 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Nov 2018 22:57:56 +0000 (23:57 +0100)
Move config to PHP array

47 files changed:
.gitignore
.travis.yml
INSTALL.txt
bin/daemon.php
bin/dev/vagrant_provision.sh
boot.php
config/addon-sample.config.php [new file with mode: 0644]
config/addon-sample.ini.php [deleted file]
config/config.ini.php [deleted file]
config/dbstructure.config.php [new file with mode: 0644]
config/dbstructure.php [deleted file]
config/defaults.config.php [new file with mode: 0644]
config/local-sample.config.php [new file with mode: 0644]
config/local-sample.ini.php [deleted file]
config/settings.config.php [new file with mode: 0644]
config/settings.ini.php [deleted file]
doc/Config.md
doc/FAQ.md
doc/Home.md
doc/Install.md
doc/Installing-Connectors.md
doc/Settings.md
doc/Update.md
doc/Vagrant.md
doc/de/FAQ.md
doc/de/Home.md
doc/de/Install.md
doc/de/Installing-Connectors.md
doc/de/Settings.md
mod/admin.php
src/App.php
src/App/Mode.php
src/Core/Config/JITConfigAdapter.php
src/Core/Console/AutomaticInstallation.php
src/Core/Console/Config.php
src/Core/Installer.php
src/Database/DBStructure.php
tests/Util/VFSTrait.php
tests/src/App/ModeTest.php
tests/src/Core/Console/AutomaticInstallationConsoleTest.php
tests/src/Core/Console/ConfigConsoleTest.php
tests/src/Core/InstallerTest.php
update.php
util/local.config.vagrant.php [new file with mode: 0644]
util/local.ini.vagrant.php [deleted file]
view/templates/local.config.tpl [new file with mode: 0644]
view/templates/local.ini.tpl [deleted file]

index db1c3c1306498253b3694991dbc5a1fd9e393b38..87ce354c1f57f41fe2e33ca1451101289d61a4b0 100644 (file)
@@ -11,6 +11,8 @@ home.html
 robots.txt
 
 #ignore local config
+/config/local.config.php
+/config/addon.config.php
 /config/local.ini.php
 /config/addon.ini.php
 
index bb8b11311263228bb56cf05403b0325bfaf78a3d..f9f9acff197bc402809bd4703fc750e519d4f7ad 100644 (file)
@@ -17,7 +17,7 @@ env:
 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
index 2f0613fb7d222843883293ce7473e8266bc41b5f..9d10e8aee6b1df6d61db73fc8c684fa46bbbbd34 100644 (file)
@@ -114,7 +114,7 @@ password, database name).
 
 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.
@@ -128,9 +128,9 @@ so in the host name setting for the database.
 
 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
@@ -139,7 +139,7 @@ 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.
 
 ****************************************************************************
@@ -184,7 +184,7 @@ Bad things will happen. 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 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.
 
@@ -281,21 +281,21 @@ Windows).
 
 
 #####################################################################
-- 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
@@ -334,11 +334,12 @@ After a while I noticed, that bin/worker.php calls further php script via
 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
index f628031c351ae595d8b22c72392c56a02487683e..9df8b8957ac4701e3973b1168946f87f90f1d5bf 100755 (executable)
@@ -42,9 +42,14 @@ if ($a->getMode()->isInstall()) {
 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');
index ac093e7897df2eeddd2f5b44eb6d9eae34890253..440a7b590c78ae8582622ae0189e63626b61ba2b 100755 (executable)
@@ -86,8 +86,7 @@ cd /var/www
 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
index 6373b2c64b4c525753897d9f95e859280492f112..f3d1f6f649eb511050002de2bab0d4eeb1dd6526 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -56,13 +56,13 @@ define('EOL',                    "<br />\r\n");
  * @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);
 
@@ -73,10 +73,12 @@ 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.
diff --git a/config/addon-sample.config.php b/config/addon-sample.config.php
new file mode 100644 (file)
index 0000000..2c88073
--- /dev/null
@@ -0,0 +1,12 @@
+<?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
diff --git a/config/addon-sample.ini.php b/config/addon-sample.ini.php
deleted file mode 100644 (file)
index 2665412..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?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
diff --git a/config/config.ini.php b/config/config.ini.php
deleted file mode 100644 (file)
index 3031d7d..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-<?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
diff --git a/config/dbstructure.config.php b/config/dbstructure.config.php
new file mode 100644 (file)
index 0000000..99e3de9
--- /dev/null
@@ -0,0 +1,1377 @@
+<?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"]
+               ]
+       ]
+];
diff --git a/config/dbstructure.php b/config/dbstructure.php
deleted file mode 100644 (file)
index 99e3de9..0000000
+++ /dev/null
@@ -1,1377 +0,0 @@
-<?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"]
-               ]
-       ]
-];
diff --git a/config/defaults.config.php b/config/defaults.config.php
new file mode 100644 (file)
index 0000000..ec855ab
--- /dev/null
@@ -0,0 +1,424 @@
+<?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
diff --git a/config/local-sample.config.php b/config/local-sample.config.php
new file mode 100644 (file)
index 0000000..4f688ed
--- /dev/null
@@ -0,0 +1,44 @@
+<?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
diff --git a/config/local-sample.ini.php b/config/local-sample.ini.php
deleted file mode 100644 (file)
index 359f3ee..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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
diff --git a/config/settings.config.php b/config/settings.config.php
new file mode 100644 (file)
index 0000000..274ec7e
--- /dev/null
@@ -0,0 +1,113 @@
+<?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
diff --git a/config/settings.ini.php b/config/settings.ini.php
deleted file mode 100644 (file)
index 02482c8..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?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
index 788c1cd0b6c1fd38c997c76d7a93042a6320907f..f85ceb4985ca71d88438bfc1356aaf9bd49b845a 100644 (file)
@@ -1,55 +1,54 @@
-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 {
@@ -81,7 +80,7 @@ table.config > * > tr > th {
        <thead>
                <tr>
                        <th>.htconfig.php</th>
-                       <th>config/local.ini.php</th>
+                       <th>config/local.config.php</th>
                </tr>
        </thead>
        <tbody>
@@ -94,25 +93,25 @@ $db_data = 'mysqldatabasename';
 $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(
@@ -122,74 +121,137 @@ $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:
 
@@ -199,7 +261,7 @@ If all of the following environment variables are set, Friendica will use them i
     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.
@@ -210,22 +272,26 @@ Or it is for testing purposes only.
 **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',
+    ]
index 1b84b5cd800ba9a89f26d8cd8b8b86f9ca0dcc0f..46219cce5ff8d5c5636152feb8fd7af9ecfeb8e0 100644 (file)
@@ -64,7 +64,7 @@ However, instead of a direct upload you have to use one of the following methods
 
 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>
@@ -140,7 +140,7 @@ Example: Friendica Support
 <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
@@ -187,7 +187,7 @@ No, this function is no longer supported as of Friendica 3.3 onwards.
 <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).
@@ -197,14 +197,14 @@ If you are searching for new themes, you can find them at [Friendica-Themes.com]
 <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">
index a353bab0d3046a004e0abd0c2aa93026a7c7d590..5ca573c47bbb93c4332cf77a8b01813bbfa13810 100644 (file)
@@ -32,7 +32,7 @@ Friendica Documentation and Resources
 * [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)
 
@@ -56,7 +56,7 @@ Friendica Documentation and Resources
        * [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**
index e8a7d509edbf1af3faf5dc0133655a16f33c06c7..275d21b768b03ec43f1eb26da6e05c81103832e4 100644 (file)
@@ -32,7 +32,7 @@ Requirements
   * 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.
@@ -75,7 +75,7 @@ Clone the addon repository (separately):
 
 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
@@ -108,19 +108,19 @@ If you need to specify a port for the connection to the database, you can do so
 
 *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>`)
 
@@ -136,17 +136,17 @@ If you wish to include all optional checks, use `-a` like this statement:
     
 *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
 
@@ -158,7 +158,7 @@ You can use the options during installation too and skip some of the environment
 
 **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
@@ -170,13 +170,13 @@ if you don't use the option `--savedb` during installation, the DB credentials w
 **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:
 
@@ -184,7 +184,7 @@ 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`)
@@ -256,5 +256,5 @@ Bad things will happen.
 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.
index f1eba5a6a01ede5f94164bf67171eb09f7492b7d..d63d2c2e1cb7e18a055616bf6728370def7f4338 100644 (file)
@@ -19,7 +19,7 @@ Addons must be installed by the site administrator before they can be used.
 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.
 
@@ -39,7 +39,7 @@ You can get it from [Twitter](https://twitter.com/apps).
 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
index dda2a9a587112e308d9b318b9940e36e83466175..9f54513fbcd23f46a7ae415e9fcb7b62a4712b0e 100644 (file)
@@ -8,7 +8,7 @@ On the front page of the admin panel you will see a summary of information about
 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.
 
@@ -16,9 +16,9 @@ Then you get an overview of the accounts on your node, which can be moderated in
 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
 
@@ -42,17 +42,17 @@ This option will set the default language for the node.
 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
@@ -68,8 +68,8 @@ You can chose between the following modes:
 
 ##### 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
@@ -91,7 +91,7 @@ The ability to create "Pages" requires a person to register more than once.
 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
@@ -141,7 +141,7 @@ Wildcards are accepted.
 (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
 
@@ -184,7 +184,7 @@ Value is in seconds.
 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.
@@ -217,7 +217,7 @@ The tasks for the background process have priorities.
 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
@@ -234,13 +234,13 @@ You can sort the user list by name, email, registration date, date of last login
 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.
@@ -263,16 +263,16 @@ In this section of the admin panel you can select a default setting for your nod
 ## 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.
 
@@ -288,7 +288,7 @@ Matching is exact, blocking a domain doesn't block subdomains.
 ## 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
 
@@ -304,16 +304,16 @@ All those addons will be listed in this area of the admin panels side bar with t
 
 ## 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.
@@ -324,8 +324,8 @@ You should set up some kind of [log rotation](https://en.wikipedia.org/wiki/Log_
 
 **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:
@@ -345,7 +345,7 @@ If you encounter a blank (white) page when using the application, view the PHP l
 
 ## 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.
@@ -359,12 +359,15 @@ These are the data base settings, the admin account settings, the path of PHP an
 
 ## 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
 
@@ -373,27 +376,30 @@ By default this will be the one account you create during the installation proce
 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.
 
index 835dd3375dc3a08ca4e28f48f6b6113d5ac0ad99..17c2d0e7245b365fb44d22970194ed0743e79f92 100644 (file)
@@ -7,7 +7,7 @@ Updating Friendica
 
 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.
index 6fd74240d9560f8be6428505d591588160080c16..4040495ca63cd63a6d316fb6d728bd5c79971b7b 100644 (file)
@@ -42,7 +42,7 @@ This will not delete the virtual machine.
 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".
 
@@ -53,6 +53,6 @@ You will then have the following accounts to login:
   * 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/).
index fe8a9d128d44fd80e26310d686cd58d388efc7c1..0c77635ccb9d09972ca7c8cfc3c8af2a55bd92c3 100644 (file)
@@ -199,7 +199,7 @@ Admin
 
 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>
@@ -216,13 +216,13 @@ Wenn Du neue Themen suchst, findest Du sie auf [Friendica-Themes.com](http://fri
 <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">
index 6c95476edac23ce3345d336971cbf6a0b3d42186..1498ccff1a8ff4c5339987b55284c94f9c160779 100644 (file)
@@ -34,7 +34,7 @@ Friendica - Dokumentation und Ressourcen
 * [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)
 
index 21c5513ac443f56493fb2cb595593ca9b5e0005e..209f78c6088754bb0b6f8da2f70f9f73ffaecdfc 100644 (file)
@@ -112,18 +112,18 @@ Bitte beachte jeden Fehler und korrigiere diese, bevor du fortfährst.
 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>`)
 
@@ -139,17 +139,17 @@ Falls du alle optionalen Checks ausfürehn lassen möchtest, benutze diese Optio
     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
 
@@ -161,7 +161,7 @@ Umgebungsvariablen können auch durch adäquate Optionen (z.B. `--dbhost <hostna
 
 **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
@@ -173,7 +173,7 @@ Nur wenn die Option `--savedb` gesetzt ist, werden diese Umgebungsvariablen auch
 **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)
@@ -186,7 +186,7 @@ Gehe im Anschluss in den Friendica-Hauptordner und führe den Kommandozeilen Bef
     
 #### 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`)
@@ -227,5 +227,5 @@ Es werden schlimme Dinge geschehen.
 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.
index 3fa46ab5a41c46983f9dd0354c6059c15386ecfe..9025d3d73b2088144dfacd9b6d24e8af4cd1f43f 100644 (file)
@@ -18,7 +18,7 @@ Erweiterung müssen vom Administrator installiert werden, bevor sie genutzt werd
 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.
 
@@ -37,7 +37,7 @@ Um dieses Erweiterung zu nutzen, benötigst du einen OAuth Consumer-Schlüsselpa
 
 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]
index 4d84f873ff735ec57f45cbe6936818146dbed8c9..12cc035079391ee6616fa17f29c4d56335001152 100644 (file)
@@ -66,7 +66,7 @@ Dabei kannst du zwischen den folgenden Optionen wählen:
 ##### 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
 
@@ -313,7 +313,7 @@ Du solltest deshalb einen Dienst zur [log rotation](https://en.wikipedia.org/wik
 **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');
@@ -347,10 +347,13 @@ Dies sind die Datenbank Einstellungen, die Administrator Accounts, der PHP Pfad
 
 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.
 
@@ -367,16 +370,18 @@ Normalerweise trifft dies auf den ersten Account zu, der nach der Installation a
 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
 
@@ -384,10 +389,11 @@ Man kann Friendica in ein Unterverzeichnis des Webservers installieren.
 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.
index dca1c33620f2518273b0ceaa1a00d2b2f2ab2060..cedd6748ec7fac0a97211a3255b0f63db4d6bd58 100644 (file)
@@ -914,7 +914,7 @@ function admin_page_summary(App $a)
        // 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
index 67625228b40153d1d1e5fe80c0115756d019b1c6..845560a4d676df27d4d3548eb8d1b88b1123bd15 100644 (file)
@@ -214,7 +214,7 @@ class App
                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) {
@@ -329,24 +329,24 @@ class App
         * 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);
@@ -374,33 +374,26 @@ class App
                        }
                }
 
-               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);
@@ -408,34 +401,79 @@ class App
                $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);
+                               }
+                       }
                }
        }
 
@@ -661,8 +699,8 @@ class App
                                $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') != '') {
index d9f5cdbd4c5b09f79cfa1f12c0dbd9f975e81e5e..fdfb2ce6e0b4cb9ec6210fd1fe9f2a637d893f84 100644 (file)
@@ -52,8 +52,9 @@ class Mode
 
                $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;
                }
 
index b985d91c2122ade49efee07753ecfccaa9c1911a..2018f583d610c6d466c62245c732fec81f1c04cc 100644 (file)
@@ -65,13 +65,13 @@ class JITConfigAdapter extends BaseObject implements IConfigAdapter
                        $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;
 
index 294009ada015e5939955c550dbdc2b257de8d309..150b7e52a77447d85d3a7b7b5197b008a171263b 100644 (file)
@@ -23,7 +23,7 @@ Synopsis
        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.
@@ -32,7 +32,7 @@ Options
     -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)
@@ -58,11 +58,11 @@ Environment variables
    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
@@ -96,11 +96,11 @@ HELP;
                $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");
                                }
                        }
 
@@ -175,7 +175,7 @@ HELP;
                        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");
index 3b92d5a784a5e7aa69fb8842d94592fb3a054664..ce367fffbf748785c4f81dbc1c46ef341d4bdfc5 100644 (file)
@@ -59,7 +59,7 @@ Description
                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
index f7190b2f898ee5488b1c5a2d423b85c188639901..b84bcd916efc4574c2effbd767890cf0deaf901b 100644 (file)
@@ -123,7 +123,7 @@ class Installer
 
        /**
         * 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')
@@ -141,7 +141,7 @@ class Installer
         */
        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,
@@ -154,10 +154,10 @@ class Installer
                        '$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;
@@ -444,9 +444,9 @@ class Installer
        }
 
        /**
-        * "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
         */
@@ -454,17 +454,17 @@ class Installer
        {
                $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;
index d4a1ee937fcedc759ca5c0ae658b27e0794339b6..b5e444020ab4492059de9a46dd2e37d1dd3a0a3f 100644 (file)
@@ -28,7 +28,7 @@ class DBStructure
        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
         */
@@ -783,10 +783,10 @@ class DBStructure
        }
 
        /**
-        * 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
@@ -796,16 +796,16 @@ class DBStructure
                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;
index 972119134ab502336837afe74dbadfbd31196621..50999b984d1f3ddae4dbd2e9552661c3fc5d2024 100644 (file)
@@ -27,10 +27,10 @@ trait VFSTrait
                // 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');
        }
 
        /**
index cab953bdafcdf7eef6be6c005a22db2b274c028d..d534e24edea507c9a8eb5bf3049883976e998607 100644 (file)
@@ -36,11 +36,11 @@ class ModeTest extends MockedTest
        {
                $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();
 
index 957517f0350cd26af6ff19bf96766a94bdb505f3..29a0e907e5cb702104cc91cae04ec42040e28fc5 100644 (file)
@@ -41,9 +41,9 @@ class AutomaticInstallationConsoleTest extends ConsoleTest
        {
                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');
@@ -58,7 +58,7 @@ class AutomaticInstallationConsoleTest extends ConsoleTest
        }
 
        /**
-        * 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
         *
@@ -184,51 +184,53 @@ FIN;
                $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'));
        }
 
        /**
@@ -241,7 +243,7 @@ CONF;
                $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'));
@@ -267,7 +269,7 @@ CONF;
                $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'));
@@ -292,7 +294,7 @@ CONF;
                $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);
@@ -326,7 +328,7 @@ CONF;
        {
                $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'));
@@ -350,7 +352,7 @@ Synopsis
        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.
@@ -359,7 +361,7 @@ Options
     -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)
@@ -385,11 +387,11 @@ Environment variables
    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
index 8f845ae7b05c2e9c227b13e912c241212a06a383..3ba2bd60d36951dbdf31e35cfaf610a08cf4a170 100644 (file)
@@ -139,7 +139,7 @@ Description
                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
index ebbf5037d4b780ff464209ea130536bd92aa4ec7..32a80a77e0988adc3ef3283d3d22c776a7f61802 100644 (file)
@@ -195,14 +195,14 @@ class InstallerTest extends MockedTest
         */
        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());
index 115f817d795c6d92a42eac427ca1642a0650a9ed..41b6fa96f2eb18c687393269591d5738b57e2f1a 100644 (file)
@@ -21,7 +21,7 @@ require_once 'include/dba.php';
  * 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.
@@ -33,7 +33,7 @@ require_once 'include/dba.php';
  *
  * 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()"
  */
diff --git a/util/local.config.vagrant.php b/util/local.config.vagrant.php
new file mode 100644 (file)
index 0000000..8eebb67
--- /dev/null
@@ -0,0 +1,41 @@
+<?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
diff --git a/util/local.ini.vagrant.php b/util/local.ini.vagrant.php
deleted file mode 100644 (file)
index 9d3a5f4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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
diff --git a/view/templates/local.config.tpl b/view/templates/local.config.tpl
new file mode 100644 (file)
index 0000000..54ff279
--- /dev/null
@@ -0,0 +1,35 @@
+<?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}}',
+       ],
+];
diff --git a/view/templates/local.ini.tpl b/view/templates/local.ini.tpl
deleted file mode 100644 (file)
index 85df073..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?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