Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2022-02-03 16:12:45 +0300
committerGitHub <noreply@github.com>2022-02-03 16:12:45 +0300
commite6e4702e5b21d326db0ad16537b26befcc896d69 (patch)
treeeac0243d6e8d5aaece6765fe6b24df0c72190989
parent3d63d45c71bdb9b529e4df086e1fed72de5ae463 (diff)
parent8785d5e93415edc7c8e26a2ce1e11f723f725b34 (diff)
Merge pull request #2143 from nextcloud/enh/index-session-lastcontact
Add index for last_contact in text_sessions table
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/Migration/Version010000Date20190617184535.php1
-rw-r--r--lib/Migration/Version030501Date20220202101853.php35
3 files changed, 37 insertions, 1 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 2a8504e7c..07228f7ea 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -11,7 +11,7 @@
- **๐Ÿ’พ Open format:** Files are saved as [Markdown](https://en.wikipedia.org/wiki/Markdown), so you can edit them from any other text app too.
- **โœŠ Strong foundation:** We use [๐Ÿˆ tiptap](https://tiptap.scrumpy.io) which is based on [๐Ÿฆ‰ ProseMirror](https://prosemirror.net) โ€“ huge thanks to them!
]]></description>
- <version>3.5.0</version>
+ <version>3.5.1</version>
<licence>agpl</licence>
<author mail="jus@bitgrid.net">Julius Hรคrtl</author>
<namespace>Text</namespace>
diff --git a/lib/Migration/Version010000Date20190617184535.php b/lib/Migration/Version010000Date20190617184535.php
index d71bc9d0e..aaafc1182 100644
--- a/lib/Migration/Version010000Date20190617184535.php
+++ b/lib/Migration/Version010000Date20190617184535.php
@@ -101,6 +101,7 @@ class Version010000Date20190617184535 extends SimpleMigrationStep {
]);
$table->setPrimaryKey(['id']);
$table->addIndex(['token'], 'rd_session_token_idx');
+ $table->addIndex(['last_contact'], 'ts_lastcontact');
}
if (!$schema->hasTable('text_steps')) {
diff --git a/lib/Migration/Version030501Date20220202101853.php b/lib/Migration/Version030501Date20220202101853.php
new file mode 100644
index 000000000..dcdede67e
--- /dev/null
+++ b/lib/Migration/Version030501Date20220202101853.php
@@ -0,0 +1,35 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OCA\Text\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+/**
+ * Auto-generated migration step: Please modify to your needs!
+ */
+class Version030501Date20220202101853 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();
+
+ $table = $schema->getTable('text_sessions');
+ if (!$table->hasIndex('ts_lastcontact')) {
+ $table->addIndex(['last_contact'], 'ts_lastcontact');
+ return $schema;
+ }
+
+ return null;
+ }
+}