diff --git a/database.sql b/database.sql index fa11843e43..ac3eaaf1df 100644 --- a/database.sql +++ b/database.sql @@ -340,22 +340,6 @@ CREATE TABLE IF NOT EXISTS `account-user` ( FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Remote and local accounts'; --- --- TABLE addon --- -CREATE TABLE IF NOT EXISTS `addon` ( - `id` int unsigned NOT NULL auto_increment COMMENT '', - `name` varchar(50) NOT NULL DEFAULT '' COMMENT 'addon base (file)name', - `version` varchar(50) NOT NULL DEFAULT '' COMMENT 'currently unused', - `installed` boolean NOT NULL DEFAULT '0' COMMENT 'currently always 1', - `hidden` boolean NOT NULL DEFAULT '0' COMMENT 'currently unused', - `timestamp` int unsigned NOT NULL DEFAULT 0 COMMENT 'file timestamp to check for reloads', - `plugin_admin` boolean NOT NULL DEFAULT '0' COMMENT '1 = has admin config, 0 = has no admin config', - PRIMARY KEY(`id`), - INDEX `installed_name` (`installed`,`name`), - UNIQUE INDEX `name` (`name`) -) DEFAULT COLLATE utf8mb4_general_ci COMMENT='registered addons'; - -- -- TABLE apcontact -- diff --git a/doc/database.md b/doc/database.md index edfb7b8226..461c1c2d9b 100644 --- a/doc/database.md +++ b/doc/database.md @@ -10,7 +10,6 @@ Database Tables | [2fa_trusted_browser](help/database/db_2fa_trusted_browser) | Two-factor authentication trusted browsers | | [account-suggestion](help/database/db_account-suggestion) | Account suggestion | | [account-user](help/database/db_account-user) | Remote and local accounts | -| [addon](help/database/db_addon) | registered addons | | [apcontact](help/database/db_apcontact) | ActivityPub compatible contacts - used in the ActivityPub implementation | | [application](help/database/db_application) | OAuth application | | [application-marker](help/database/db_application-marker) | Timeline marker | diff --git a/doc/database/db_addon.md b/doc/database/db_addon.md deleted file mode 100644 index 7233b80095..0000000000 --- a/doc/database/db_addon.md +++ /dev/null @@ -1,29 +0,0 @@ -Table addon -=========== - -registered addons - -Fields ------- - -| Field | Description | Type | Null | Key | Default | Extra | -| ------------ | --------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | -| id | | int unsigned | NO | PRI | NULL | auto_increment | -| name | addon base (file)name | varchar(50) | NO | | | | -| version | currently unused | varchar(50) | NO | | | | -| installed | currently always 1 | boolean | NO | | 0 | | -| hidden | currently unused | boolean | NO | | 0 | | -| timestamp | file timestamp to check for reloads | int unsigned | NO | | 0 | | -| plugin_admin | 1 = has admin config, 0 = has no admin config | boolean | NO | | 0 | | - -Indexes ------------- - -| Name | Fields | -| -------------- | --------------- | -| PRIMARY | id | -| installed_name | installed, name | -| name | UNIQUE, name | - - -Return to [database documentation](help/database) diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 9179921d05..cc420a449b 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -399,23 +399,6 @@ return [ "uid_uri-id" => ["uid", "uri-id"], ] ], - "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"], - "installed_name" => ["installed", "name"], - "name" => ["UNIQUE", "name"], - ] - ], "apcontact" => [ "comment" => "ActivityPub compatible contacts - used in the ActivityPub implementation", "fields" => [ diff --git a/tests/src/Module/Api/ApiTest.php b/tests/src/Module/Api/ApiTest.php index 90dfa30b0a..812993aa98 100644 --- a/tests/src/Module/Api/ApiTest.php +++ b/tests/src/Module/Api/ApiTest.php @@ -24,6 +24,7 @@ namespace Friendica\Test\src\Module\Api; use Friendica\App; use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Addon; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Hook; use Friendica\Database\Database; use Friendica\DI; @@ -212,15 +213,14 @@ abstract class ApiTest extends FixtureTest $func(DI::app()); } - /** @var Database $dba */ - $dba = $this->dice->create(Database::class); + /** @var $config IManageConfigValues */ + $config = $this->dice->create(IManageConfigValues::class); - $dba->insert('addon', [ + $config->set('addons', $addon, [ 'name' => $addon, 'installed' => true, 'timestamp' => $t, 'plugin_admin' => function_exists($addon . '_addon_admin'), - 'hidden' => file_exists('addon/' . $addon . '/.hidden') ]); Addon::loadAddons();