]> git.mxchange.org Git - friendica.git/commitdiff
Re-Add Config table
authorPhilipp <admin@philipp.info>
Sat, 4 Feb 2023 19:52:24 +0000 (20:52 +0100)
committerPhilipp <admin@philipp.info>
Fri, 10 Feb 2023 13:06:22 +0000 (14:06 +0100)
database.sql
doc/database.md
src/Database/DBStructure.php
static/dbstructure.config.php

index 843db1f6cffb649a3b1bd83b495b30e3d3732fb8..b6ee05e84e6c54bf9f3ef6bdd86bb79b6e633418 100644 (file)
@@ -495,6 +495,16 @@ CREATE TABLE IF NOT EXISTS `cache` (
         INDEX `k_expires` (`k`,`expires`)
 ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Stores temporary data';
 
+--
+-- TABLE config
+--
+CREATE TABLE IF NOT EXISTS `config` (
+       `cat` varbinary(50) NOT NULL DEFAULT '' COMMENT 'The category of the entry',
+       `k` varbinary(50) NOT NULL DEFAULT '' COMMENT 'The key of the entry',
+       `v` mediumtext COMMENT '',
+        PRIMARY KEY(`cat`,`k`)
+) DEFAULT COLLATE utf8mb4_general_ci COMMENT='main configuration storage';
+
 --
 -- TABLE contact-relation
 --
index 95e0367afe9ab30f08ff578b55476c5efc72e537..edfb7b82267ee0ae1389691b4aff65f2cb1f6495 100644 (file)
@@ -18,6 +18,7 @@ Database Tables
 | [arrived-activity](help/database/db_arrived-activity) | Id of arrived activities |
 | [attach](help/database/db_attach) | file attachments |
 | [cache](help/database/db_cache) | Stores temporary data |
+| [config](help/database/db_config) | main configuration storage |
 | [contact](help/database/db_contact) | contact table |
 | [contact-relation](help/database/db_contact-relation) | Contact relations |
 | [conv](help/database/db_conv) | private messages |
index 579b9cdc118902b07be1ec3ccdb5868b4563e2f4..dc1e785a50071dac4875bbcc3967ea0d76b60f3e 100644 (file)
@@ -74,7 +74,7 @@ class DBStructure
                $old_tables = ['fserver', 'gcign', 'gcontact', 'gcontact-relation', 'gfollower' ,'glink', 'item-delivery-data',
                        'item-activity', 'item-content', 'item_id', 'participation', 'poll', 'poll_result', 'queue', 'retriever_rule',
                        'deliverq', 'dsprphotoq', 'ffinder', 'sign', 'spam', 'term', 'user-item', 'thread', 'item', 'challenge',
-                       'auth_codes', 'tokens', 'clients', 'profile_check', 'host', 'conversation', 'fcontact', 'config', 'addon'];
+                       'auth_codes', 'tokens', 'clients', 'profile_check', 'host', 'conversation', 'fcontact', 'addon'];
 
                $tables = DBA::selectToArray('INFORMATION_SCHEMA.TABLES', ['TABLE_NAME'],
                        ['TABLE_SCHEMA' => DBA::databaseName(), 'TABLE_TYPE' => 'BASE TABLE']);
index 9dfd7820c1d2ee16a55ac8dc8c19c0e714238386..3eeacb705d336bd426f4336cad662524480e88a5 100644 (file)
@@ -554,6 +554,17 @@ return [
                        "k_expires" => ["k", "expires"],
                ]
        ],
+       "config" => [
+               "comment" => "main configuration storage",
+               "fields" => [
+                       "cat" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The category of the entry"],
+                       "k" => ["type" => "varbinary(50)", "not null" => "1", "default" => "", "comment" => "The key of the entry"],
+                       "v" => ["type" => "mediumtext", "comment" => ""],
+               ],
+               "indexes" => [
+                       "PRIMARY" => ["cat", "k"],
+               ]
+       ],
        "contact-relation" => [
                "comment" => "Contact relations",
                "fields" => [