diff --git a/apps/federatedfilesharing/appinfo/database.xml b/apps/federatedfilesharing/appinfo/database.xml deleted file mode 100644 index 1dbe8ee2ec904..0000000000000 --- a/apps/federatedfilesharing/appinfo/database.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - *dbname* - true - false - utf8 - - *dbprefix*federated_reshares - - - share_id - integer - true - 4 - - - remote_id - integer - true - 4 - share ID at the remote server - - - share_id_index - true - - share_id - ascending - - - -
-
diff --git a/apps/federatedfilesharing/appinfo/info.xml b/apps/federatedfilesharing/appinfo/info.xml index 56a0f93cbc00c..b30656fa51df2 100644 --- a/apps/federatedfilesharing/appinfo/info.xml +++ b/apps/federatedfilesharing/appinfo/info.xml @@ -5,7 +5,7 @@ Federated file sharing Provide federated file sharing across servers Provide federated file sharing across servers - 1.10.0 + 1.10.1 agpl Bjoern Schiessle Roeland Jago Douma diff --git a/apps/federatedfilesharing/composer/composer/autoload_classmap.php b/apps/federatedfilesharing/composer/composer/autoload_classmap.php index c8487b3acfd10..15573f5434f81 100644 --- a/apps/federatedfilesharing/composer/composer/autoload_classmap.php +++ b/apps/federatedfilesharing/composer/composer/autoload_classmap.php @@ -12,6 +12,7 @@ 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => $baseDir . '/../lib/Controller/MountPublicLinkController.php', 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php', 'OCA\\FederatedFileSharing\\FederatedShareProvider' => $baseDir . '/../lib/FederatedShareProvider.php', + 'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => $baseDir . '/../lib/Migration/Version1010Date20200630191755.php', 'OCA\\FederatedFileSharing\\Notifications' => $baseDir . '/../lib/Notifications.php', 'OCA\\FederatedFileSharing\\Notifier' => $baseDir . '/../lib/Notifier.php', 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => $baseDir . '/../lib/OCM/CloudFederationProviderFiles.php', diff --git a/apps/federatedfilesharing/composer/composer/autoload_static.php b/apps/federatedfilesharing/composer/composer/autoload_static.php index 9183e431decd6..24c93eee97389 100644 --- a/apps/federatedfilesharing/composer/composer/autoload_static.php +++ b/apps/federatedfilesharing/composer/composer/autoload_static.php @@ -27,6 +27,7 @@ class ComposerStaticInitFederatedFileSharing 'OCA\\FederatedFileSharing\\Controller\\MountPublicLinkController' => __DIR__ . '/..' . '/../lib/Controller/MountPublicLinkController.php', 'OCA\\FederatedFileSharing\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php', 'OCA\\FederatedFileSharing\\FederatedShareProvider' => __DIR__ . '/..' . '/../lib/FederatedShareProvider.php', + 'OCA\\FederatedFileSharing\\Migration\\Version1010Date20200630191755' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191755.php', 'OCA\\FederatedFileSharing\\Notifications' => __DIR__ . '/..' . '/../lib/Notifications.php', 'OCA\\FederatedFileSharing\\Notifier' => __DIR__ . '/..' . '/../lib/Notifier.php', 'OCA\\FederatedFileSharing\\OCM\\CloudFederationProviderFiles' => __DIR__ . '/..' . '/../lib/OCM/CloudFederationProviderFiles.php', diff --git a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php new file mode 100644 index 0000000000000..7e25935033b61 --- /dev/null +++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php @@ -0,0 +1,58 @@ + + * + * @author Joas Schilling + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +namespace OCA\FederatedFileSharing\Migration; + +use Closure; +use Doctrine\DBAL\Types\Types; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1010Date20200630191755 extends SimpleMigrationStep { + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('federated_reshares')) { + $table = $schema->createTable('federated_reshares'); + $table->addColumn('share_id', Types::INTEGER, [ + 'notnull' => true, + 'length' => 4, + ]); + $table->addColumn('remote_id', Types::INTEGER, [ + 'notnull' => true, + 'length' => 4, + ]); + $table->addUniqueIndex(['share_id'], 'share_id_index'); + } + return $schema; + } +} diff --git a/apps/federation/appinfo/database.xml b/apps/federation/appinfo/database.xml deleted file mode 100644 index 61c3b8ac6d8d8..0000000000000 --- a/apps/federation/appinfo/database.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - *dbname* - true - false - utf8 - - *dbprefix*trusted_servers - - - id - integer - 0 - true - 1 - 4 - - - url - text - true - 512 - Url of trusted server - - - url_hash - text - - true - sha1 hash of the url without the protocol - - - token - text - 128 - token used to exchange the shared secret - - - shared_secret - text - 256 - shared secret used to authenticate - - - status - integer - 4 - true - 2 - current status of the connection - - - sync_token - text - 512 - cardDav sync token - - - url_hash - true - - url_hash - ascending - - - -
-
diff --git a/apps/federation/appinfo/info.xml b/apps/federation/appinfo/info.xml index b56b64bf22944..fd6cb3e6e5079 100644 --- a/apps/federation/appinfo/info.xml +++ b/apps/federation/appinfo/info.xml @@ -5,7 +5,7 @@ Federation Federation allows you to connect with other trusted servers to exchange the user directory. Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing. - 1.10.0 + 1.10.1 agpl Bjoern Schiessle Federation diff --git a/apps/federation/composer/composer/autoload_classmap.php b/apps/federation/composer/composer/autoload_classmap.php index 8274bf4524009..5c2bda17856ae 100644 --- a/apps/federation/composer/composer/autoload_classmap.php +++ b/apps/federation/composer/composer/autoload_classmap.php @@ -16,6 +16,7 @@ 'OCA\\Federation\\DbHandler' => $baseDir . '/../lib/DbHandler.php', 'OCA\\Federation\\Hooks' => $baseDir . '/../lib/Hooks.php', 'OCA\\Federation\\Middleware\\AddServerMiddleware' => $baseDir . '/../lib/Middleware/AddServerMiddleware.php', + 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => $baseDir . '/../lib/Migration/Version1010Date20200630191302.php', 'OCA\\Federation\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', 'OCA\\Federation\\SyncFederationAddressBooks' => $baseDir . '/../lib/SyncFederationAddressBooks.php', 'OCA\\Federation\\SyncJob' => $baseDir . '/../lib/SyncJob.php', diff --git a/apps/federation/composer/composer/autoload_static.php b/apps/federation/composer/composer/autoload_static.php index e005986b9f901..1ee4e0f04a964 100644 --- a/apps/federation/composer/composer/autoload_static.php +++ b/apps/federation/composer/composer/autoload_static.php @@ -31,6 +31,7 @@ class ComposerStaticInitFederation 'OCA\\Federation\\DbHandler' => __DIR__ . '/..' . '/../lib/DbHandler.php', 'OCA\\Federation\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', 'OCA\\Federation\\Middleware\\AddServerMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/AddServerMiddleware.php', + 'OCA\\Federation\\Migration\\Version1010Date20200630191302' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630191302.php', 'OCA\\Federation\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', 'OCA\\Federation\\SyncFederationAddressBooks' => __DIR__ . '/..' . '/../lib/SyncFederationAddressBooks.php', 'OCA\\Federation\\SyncJob' => __DIR__ . '/..' . '/../lib/SyncJob.php', diff --git a/apps/federation/lib/Migration/Version1010Date20200630191302.php b/apps/federation/lib/Migration/Version1010Date20200630191302.php new file mode 100644 index 0000000000000..13aaedd6c06b3 --- /dev/null +++ b/apps/federation/lib/Migration/Version1010Date20200630191302.php @@ -0,0 +1,83 @@ + + * + * @author Joas Schilling + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Federation\Migration; + +use Closure; +use Doctrine\DBAL\Types\Types; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1010Date20200630191302 extends SimpleMigrationStep { + + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('trusted_servers')) { + $table = $schema->createTable('trusted_servers'); + $table->addColumn('id', Types::INTEGER, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 4, + ]); + $table->addColumn('url', Types::STRING, [ + 'notnull' => true, + 'length' => 512, + ]); + $table->addColumn('url_hash', Types::STRING, [ + 'notnull' => true, + 'default' => '', + ]); + $table->addColumn('token', Types::STRING, [ + 'notnull' => false, + 'length' => 128, + ]); + $table->addColumn('shared_secret', Types::STRING, [ + 'notnull' => false, + 'length' => 256, + ]); + $table->addColumn('status', Types::INTEGER, [ + 'notnull' => true, + 'length' => 4, + 'default' => 2, + ]); + $table->addColumn('sync_token', Types::STRING, [ + 'notnull' => false, + 'length' => 512, + ]); + $table->setPrimaryKey(['id']); + $table->addUniqueIndex(['url_hash'], 'url_hash'); + } + return $schema; + } +} diff --git a/apps/files_external/appinfo/database.xml b/apps/files_external/appinfo/database.xml deleted file mode 100644 index e39144931a77b..0000000000000 --- a/apps/files_external/appinfo/database.xml +++ /dev/null @@ -1,225 +0,0 @@ - - *dbname* - true - false - utf8 - - *dbprefix*external_mounts - - - mount_id - integer - 0 - true - 1 - 6 - - - mount_point - text - 128 - true - - - storage_backend - text - 64 - true - - - auth_backend - text - 64 - true - - - priority - integer - 100 - 4 - true - - - - type - integer - 4 - true - - -
- - *dbprefix*external_applicable - - - applicable_id - integer - 0 - true - 1 - 6 - - - - mount_id - integer - true - 6 - - - - type - integer - 4 - true - - - - value - text - 64 - - - - applicable_mount - - mount_id - ascending - - - - applicable_type_value - - type - ascending - - - value - ascending - - - - applicable_type_value_mount - true - - type - ascending - - - value - ascending - - - mount_id - ascending - - - -
- - - *dbprefix*external_config - - - config_id - integer - 0 - true - 1 - 6 - - - - mount_id - integer - true - 6 - - - key - text - true - 64 - - - value - text - false - 4096 - - - - config_mount - - mount_id - ascending - - - - config_mount_key - true - - mount_id - ascending - - - key - ascending - - - -
- - - *dbprefix*external_options - - - option_id - integer - 0 - true - 1 - 6 - - - - mount_id - integer - true - 6 - - - key - text - true - 64 - - - value - text - true - 256 - - - - option_mount - - mount_id - ascending - - - - option_mount_key - true - - mount_id - ascending - - - key - ascending - - - -
-
diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index 59c7a04701093..c2ac25bcea9f7 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -9,7 +9,7 @@ This application enables administrators to configure connections to external sto External storage can be configured using the GUI or at the command line. This second option provides the advanced user with more flexibility for configuring bulk external storage mounts and setting mount priorities. More information is available in the external storage GUI documentation and the external storage Configuration File documentation. - 1.11.0 + 1.11.1 agpl Robin Appelman Michael Gapczynski diff --git a/apps/files_external/lib/Migration/Version1011Date20200630192246.php b/apps/files_external/lib/Migration/Version1011Date20200630192246.php new file mode 100644 index 0000000000000..4ffff07e000ca --- /dev/null +++ b/apps/files_external/lib/Migration/Version1011Date20200630192246.php @@ -0,0 +1,150 @@ + + * + * @author Joas Schilling + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Files_External\Migration; + +use Closure; +use Doctrine\DBAL\Types\Types; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1011Date20200630192246 extends SimpleMigrationStep { + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('external_mounts')) { + $table = $schema->createTable('external_mounts'); + $table->addColumn('mount_id', Types::BIGINT, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('mount_point', Types::STRING, [ + 'notnull' => true, + 'length' => 128, + ]); + $table->addColumn('storage_backend', Types::STRING, [ + 'notnull' => true, + 'length' => 64, + ]); + $table->addColumn('auth_backend', Types::STRING, [ + 'notnull' => true, + 'length' => 64, + ]); + $table->addColumn('priority', Types::INTEGER, [ + 'notnull' => true, + 'length' => 4, + 'default' => 100, + ]); + $table->addColumn('type', Types::INTEGER, [ + 'notnull' => true, + 'length' => 4, + ]); + $table->setPrimaryKey(['mount_id']); + } + + if (!$schema->hasTable('external_applicable')) { + $table = $schema->createTable('external_applicable'); + $table->addColumn('applicable_id', Types::BIGINT, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('mount_id', Types::BIGINT, [ + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('type', Types::INTEGER, [ + 'notnull' => true, + 'length' => 4, + ]); + $table->addColumn('value', Types::STRING, [ + 'notnull' => false, + 'length' => 64, + ]); + $table->setPrimaryKey(['applicable_id']); + $table->addIndex(['mount_id'], 'applicable_mount'); + $table->addIndex(['type', 'value'], 'applicable_type_value'); + $table->addUniqueIndex(['type', 'value', 'mount_id'], 'applicable_type_value_mount'); + } + + if (!$schema->hasTable('external_config')) { + $table = $schema->createTable('external_config'); + $table->addColumn('config_id', Types::BIGINT, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('mount_id', Types::BIGINT, [ + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('key', Types::STRING, [ + 'notnull' => true, + 'length' => 64, + ]); + $table->addColumn('value', Types::STRING, [ + 'notnull' => false, + 'length' => 4096, + ]); + $table->setPrimaryKey(['config_id']); + $table->addIndex(['mount_id'], 'config_mount'); + $table->addUniqueIndex(['mount_id', 'key'], 'config_mount_key'); + } + + if (!$schema->hasTable('external_options')) { + $table = $schema->createTable('external_options'); + $table->addColumn('option_id', Types::BIGINT, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('mount_id', Types::BIGINT, [ + 'notnull' => true, + 'length' => 6, + ]); + $table->addColumn('key', Types::STRING, [ + 'notnull' => true, + 'length' => 64, + ]); + $table->addColumn('value', Types::STRING, [ + 'notnull' => true, + 'length' => 256, + ]); + $table->setPrimaryKey(['option_id']); + $table->addIndex(['mount_id'], 'option_mount'); + $table->addUniqueIndex(['mount_id', 'key'], 'option_mount_key'); + } + return $schema; + } +} diff --git a/apps/files_trashbin/appinfo/database.xml b/apps/files_trashbin/appinfo/database.xml deleted file mode 100644 index 2944a31b02d0e..0000000000000 --- a/apps/files_trashbin/appinfo/database.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - *dbname* - true - false - - utf8 - - - - *dbprefix*files_trash - - - - - auto_id - integer - 0 - true - 1 - 4 - - - - id - text - - true - 250 - - - - user - text - - true - 64 - - - - timestamp - text - - true - 12 - - - - location - text - - true - 512 - - - - type - text - - false - 4 - - - - mime - text - - false - 255 - - - - id_index - - id - ascending - - - - - timestamp_index - - timestamp - ascending - - - - - user_index - - user - ascending - - - - - -
- -
diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml index a6fb06c23cde0..39377ecd20846 100644 --- a/apps/files_trashbin/appinfo/info.xml +++ b/apps/files_trashbin/appinfo/info.xml @@ -9,7 +9,7 @@ This application enables users to restore files that were deleted from the syste To prevent a user from running out of disk space, the Deleted files app will not utilize more than 50% of the currently available free quota for deleted files. If the deleted files exceed this limit, the app deletes the oldest files until it gets below this limit. More information is available in the Deleted Files documentation. - 1.10.0 + 1.10.1 agpl Bjoern Schiessle Files_Trashbin diff --git a/apps/files_trashbin/composer/composer/autoload_classmap.php b/apps/files_trashbin/composer/composer/autoload_classmap.php index 011e178a5bd10..0c5c201a75bc9 100644 --- a/apps/files_trashbin/composer/composer/autoload_classmap.php +++ b/apps/files_trashbin/composer/composer/autoload_classmap.php @@ -18,6 +18,7 @@ 'OCA\\Files_Trashbin\\Expiration' => $baseDir . '/../lib/Expiration.php', 'OCA\\Files_Trashbin\\Helper' => $baseDir . '/../lib/Helper.php', 'OCA\\Files_Trashbin\\Hooks' => $baseDir . '/../lib/Hooks.php', + 'OCA\\Files_Trashbin\\Migration\\Version1010Date20200630192639' => $baseDir . '/../lib/Migration/Version1010Date20200630192639.php', 'OCA\\Files_Trashbin\\Sabre\\AbstractTrash' => $baseDir . '/../lib/Sabre/AbstractTrash.php', 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFile' => $baseDir . '/../lib/Sabre/AbstractTrashFile.php', 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFolder' => $baseDir . '/../lib/Sabre/AbstractTrashFolder.php', diff --git a/apps/files_trashbin/composer/composer/autoload_static.php b/apps/files_trashbin/composer/composer/autoload_static.php index 37144ec428824..197238a56ec92 100644 --- a/apps/files_trashbin/composer/composer/autoload_static.php +++ b/apps/files_trashbin/composer/composer/autoload_static.php @@ -33,6 +33,7 @@ class ComposerStaticInitFiles_Trashbin 'OCA\\Files_Trashbin\\Expiration' => __DIR__ . '/..' . '/../lib/Expiration.php', 'OCA\\Files_Trashbin\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', 'OCA\\Files_Trashbin\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', + 'OCA\\Files_Trashbin\\Migration\\Version1010Date20200630192639' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630192639.php', 'OCA\\Files_Trashbin\\Sabre\\AbstractTrash' => __DIR__ . '/..' . '/../lib/Sabre/AbstractTrash.php', 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFile' => __DIR__ . '/..' . '/../lib/Sabre/AbstractTrashFile.php', 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFolder' => __DIR__ . '/..' . '/../lib/Sabre/AbstractTrashFolder.php', diff --git a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php new file mode 100644 index 0000000000000..c9c03757741c3 --- /dev/null +++ b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php @@ -0,0 +1,87 @@ + + * + * @author Joas Schilling + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\Files_Trashbin\Migration; + +use Closure; +use Doctrine\DBAL\Types\Types; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1010Date20200630192639 extends SimpleMigrationStep { + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('files_trash')) { + $table = $schema->createTable('files_trash'); + $table->addColumn('auto_id', Types::INTEGER, [ + 'autoincrement' => true, + 'notnull' => true, + 'length' => 4, + ]); + $table->addColumn('id', Types::STRING, [ + 'notnull' => true, + 'length' => 250, + 'default' => '', + ]); + $table->addColumn('user', Types::STRING, [ + 'notnull' => true, + 'length' => 64, + 'default' => '', + ]); + $table->addColumn('timestamp', Types::STRING, [ + 'notnull' => true, + 'length' => 12, + 'default' => '', + ]); + $table->addColumn('location', Types::STRING, [ + 'notnull' => true, + 'length' => 512, + 'default' => '', + ]); + $table->addColumn('type', Types::STRING, [ + 'notnull' => false, + 'length' => 4, + ]); + $table->addColumn('mime', Types::STRING, [ + 'notnull' => false, + 'length' => 255, + ]); + $table->setPrimaryKey(['auto_id']); + $table->addIndex(['id'], 'id_index'); + $table->addIndex(['timestamp'], 'timestamp_index'); + $table->addIndex(['user'], 'user_index'); + } + return $schema; + } +} diff --git a/apps/user_ldap/appinfo/database.xml b/apps/user_ldap/appinfo/database.xml deleted file mode 100644 index 4875a70f852b1..0000000000000 --- a/apps/user_ldap/appinfo/database.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - *dbname* - true - false - utf8 - - - - *dbprefix*ldap_user_mapping - - - - - ldap_dn - text - true - 255 - - - - - owncloud_name - text - true - 255 - - - - - directory_uuid - text - true - 255 - - - - - ldap_dn_users - true - - ldap_dn - - - - - owncloud_name_users - true - true - - owncloud_name - ascending - - - - - -
- - - - *dbprefix*ldap_group_mapping - - - - - ldap_dn - text - true - 255 - - - - - owncloud_name - text - true - 255 - - - - - directory_uuid - text - true - 255 - - - - - ldap_dn_groups - true - true - - ldap_dn - - - - - owncloud_name_groups - true - - owncloud_name - ascending - - - - - -
- - - - - *dbprefix*ldap_group_members - - - - - owncloudname - text - true - 255 - - - - - owncloudusers - clob - true - - - - ldap_group_members_index - true - true - - owncloudname - - - - - -
- -
diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml index f59d4c3a3ac93..7a44f7f654c41 100644 --- a/apps/user_ldap/appinfo/info.xml +++ b/apps/user_ldap/appinfo/info.xml @@ -9,7 +9,7 @@ A user logs into Nextcloud with their LDAP or AD credentials, and is granted access based on an authentication request handled by the LDAP or AD server. Nextcloud does not store LDAP or AD passwords, rather these credentials are used to authenticate a user and then Nextcloud uses a session for the user ID. More information is available in the LDAP User and Group Backend documentation. - 1.10.0 + 1.10.1 agpl Dominik Schmidt Arthur Schiwon diff --git a/apps/user_ldap/composer/composer/autoload_classmap.php b/apps/user_ldap/composer/composer/autoload_classmap.php index 3b08f3f7f3e8f..2190b24688e09 100644 --- a/apps/user_ldap/composer/composer/autoload_classmap.php +++ b/apps/user_ldap/composer/composer/autoload_classmap.php @@ -52,6 +52,7 @@ 'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => $baseDir . '/../lib/Migration/UUIDFixGroup.php', 'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => $baseDir . '/../lib/Migration/UUIDFixInsert.php', 'OCA\\User_LDAP\\Migration\\UUIDFixUser' => $baseDir . '/../lib/Migration/UUIDFixUser.php', + 'OCA\\User_LDAP\\Migration\\Version1010Date20200630192842' => $baseDir . '/../lib/Migration/Version1010Date20200630192842.php', 'OCA\\User_LDAP\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', 'OCA\\User_LDAP\\PagedResults\\IAdapter' => $baseDir . '/../lib/PagedResults/IAdapter.php', 'OCA\\User_LDAP\\PagedResults\\Php54' => $baseDir . '/../lib/PagedResults/Php54.php', diff --git a/apps/user_ldap/composer/composer/autoload_static.php b/apps/user_ldap/composer/composer/autoload_static.php index 97080049d5181..2f77aebad3117 100644 --- a/apps/user_ldap/composer/composer/autoload_static.php +++ b/apps/user_ldap/composer/composer/autoload_static.php @@ -67,6 +67,7 @@ class ComposerStaticInitUser_LDAP 'OCA\\User_LDAP\\Migration\\UUIDFixGroup' => __DIR__ . '/..' . '/../lib/Migration/UUIDFixGroup.php', 'OCA\\User_LDAP\\Migration\\UUIDFixInsert' => __DIR__ . '/..' . '/../lib/Migration/UUIDFixInsert.php', 'OCA\\User_LDAP\\Migration\\UUIDFixUser' => __DIR__ . '/..' . '/../lib/Migration/UUIDFixUser.php', + 'OCA\\User_LDAP\\Migration\\Version1010Date20200630192842' => __DIR__ . '/..' . '/../lib/Migration/Version1010Date20200630192842.php', 'OCA\\User_LDAP\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', 'OCA\\User_LDAP\\PagedResults\\IAdapter' => __DIR__ . '/..' . '/../lib/PagedResults/IAdapter.php', 'OCA\\User_LDAP\\PagedResults\\Php54' => __DIR__ . '/..' . '/../lib/PagedResults/Php54.php', diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php new file mode 100644 index 0000000000000..71617c41a18e6 --- /dev/null +++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php @@ -0,0 +1,101 @@ + + * + * @author Joas Schilling + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OCA\User_LDAP\Migration; + +use Closure; +use Doctrine\DBAL\Types\Types; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version1010Date20200630192842 extends SimpleMigrationStep { + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('ldap_user_mapping')) { + $table = $schema->createTable('ldap_user_mapping'); + $table->addColumn('ldap_dn', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->addColumn('owncloud_name', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->addColumn('directory_uuid', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->setPrimaryKey(['owncloud_name']); + $table->addUniqueIndex(['ldap_dn'], 'ldap_dn_users'); + } + + if (!$schema->hasTable('ldap_group_mapping')) { + $table = $schema->createTable('ldap_group_mapping'); + $table->addColumn('ldap_dn', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->addColumn('owncloud_name', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->addColumn('directory_uuid', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->setPrimaryKey(['ldap_dn']); + $table->addUniqueIndex(['owncloud_name'], 'owncloud_name_groups'); + } + + if (!$schema->hasTable('ldap_group_members')) { + $table = $schema->createTable('ldap_group_members'); + $table->addColumn('owncloudname', Types::STRING, [ + 'notnull' => true, + 'length' => 255, + 'default' => '', + ]); + $table->addColumn('owncloudusers', Types::TEXT, [ + 'notnull' => true, + ]); + $table->setPrimaryKey(['owncloudname']); + } + return $schema; + } +}