use OC\Authentication\Notifications\Notifier as AuthenticationNotifier;
use OC\Core\Listener\BeforeTemplateRenderedListener;
use OC\Core\Notification\CoreNotifier;
-use OC\SystemConfig;
use OC\TagManager;
use OCP\AppFramework\App;
use OCP\AppFramework\Http\Events\BeforeLoginTemplateRenderedEvent;
$notificationManager->registerNotifierService(AuthenticationNotifier::class);
$eventDispatcher->addListener(AddMissingIndicesEvent::class, function (AddMissingIndicesEvent $event) {
- $dbType = $this->getContainer()->get(SystemConfig::class)->getSystemValue('dbtype', 'sqlite');
$event->addMissingIndex(
'share',
'share_with_index',
['appid', 'configkey']
);
- if ($dbType !== 'oci') {
- $event->addMissingIndex(
- 'preferences',
- 'preferences_configvalue',
- ['configvalue'],
- ['lengths' => [80]]
- );
- }
-
$event->addMissingIndex(
'mounts',
'mounts_class_index',
*/
namespace OC\Core\Migrations;
-use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
]);
$table->setPrimaryKey(['userid', 'appid', 'configkey']);
$table->addIndex(['appid', 'configkey'], 'preferences_app_key');
- if (!$this->connection->getDatabasePlatform() instanceof OraclePlatform) {
- $table->addIndex(['configvalue'], 'preferences_configvalue', [], ['lengths' => [80]]);
- }
}
if (!$schema->hasTable('properties')) {