diff options
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | lib/Migration/Version030001Date20200402075029.php | 35 |
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; + } +} |