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:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-04-02 10:54:05 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-04-02 11:39:24 +0300
commitd2a8ab5f3f9113ae69603efac5c24290d30a15f6 (patch)
treed4631625096da9cf6b3e005404feccbef57fe2d6
parent380e7a6d2a4ef5993e2da7431f99df6370b417e9 (diff)
Add index on the oc_text_sessions table
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/Migration/Version030001Date20200402075029.php35
2 files changed, 36 insertions, 1 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml
index fc8e63a78..b541a03c9 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.0.0</version>
+ <version>3.0.1</version>
<licence>agpl</licence>
<author mail="jus@bitgrid.net">Julius Hรคrtl</author>
<namespace>Text</namespace>
diff --git a/lib/Migration/Version030001Date20200402075029.php b/lib/Migration/Version030001Date20200402075029.php
new file mode 100644
index 000000000..23b8b5936
--- /dev/null
+++ b/lib/Migration/Version030001Date20200402075029.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 Version030001Date20200402075029 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');
+ $table->addIndex([
+ 'document_id',
+ 'last_contact',
+ ], 'ts_docid_lastcontact');
+
+ return $schema;
+ }
+}