-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
speed-up sync (rewrite MetaService, add Hooks, ..)
- Loading branch information
Showing
13 changed files
with
378 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> | ||
<id>notes</id> | ||
<name>Notes</name> | ||
<summary>Distraction-free notes and writing</summary> | ||
<description><![CDATA[ | ||
<id>notes</id> | ||
<name>Notes</name> | ||
<summary>Distraction-free notes and writing</summary> | ||
<description><![CDATA[ | ||
The Notes app is a distraction free notes taking app for [Nextcloud](https://www.nextcloud.com/). It provides categories for better organization and supports formatting using [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax. Notes are saved as files in your Nextcloud, so you can view and edit them with every Nextcloud client. Furthermore, a separate [REST API](docs/api/README.md) allows for an easy integration into third-party apps (currently, there are notes apps for [Android](https://github.com/stefan-niedermann/nextcloud-notes), [iOS](https://github.com/owncloud/notes-iOS-App) and the [console](https://git.danielmoch.com/nncli/about) which allow convenient access to your Nextcloud notes). Further features include marking notes as favorites. | ||
]]></description> | ||
<version>3.4.0</version> | ||
<licence>agpl</licence> | ||
<author>Kristof Hamann</author> | ||
<author>Bernhard Posselt</author> | ||
<author>Hendrik Leppelsack</author> | ||
<author>Jan-Christoph Borchardt</author> | ||
<namespace>Notes</namespace> | ||
<category>office</category> | ||
<category>organization</category> | ||
<category>tools</category> | ||
<website>https://github.com/nextcloud/notes</website> | ||
<bugs>https://github.com/nextcloud/notes/issues</bugs> | ||
<repository type="git">https://github.com/nextcloud/notes.git</repository> | ||
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot> | ||
<dependencies> | ||
<nextcloud min-version="16" max-version="21" /> | ||
</dependencies> | ||
<version>3.5.0-dev</version> | ||
<licence>agpl</licence> | ||
<author>Kristof Hamann</author> | ||
<author>Bernhard Posselt</author> | ||
<author>Hendrik Leppelsack</author> | ||
<author>Jan-Christoph Borchardt</author> | ||
<namespace>Notes</namespace> | ||
<category>office</category> | ||
<category>organization</category> | ||
<category>tools</category> | ||
<website>https://github.com/nextcloud/notes</website> | ||
<bugs>https://github.com/nextcloud/notes/issues</bugs> | ||
<repository type="git">https://github.com/nextcloud/notes.git</repository> | ||
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot> | ||
<dependencies> | ||
<nextcloud min-version="16" max-version="21" /> | ||
</dependencies> | ||
<repair-steps> | ||
<post-migration> | ||
<step>OCA\Notes\Migration\Cleanup</step> | ||
</post-migration> | ||
</repair-steps> | ||
</info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
|
||
class Helper { | ||
|
||
private $logger; | ||
public $logger; | ||
private $appName; | ||
|
||
public function __construct( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace OCA\Notes\Migration; | ||
|
||
use OCA\Notes\Db\MetaMapper; | ||
|
||
use OCP\Migration\IRepairStep; | ||
use OCP\Migration\IOutput; | ||
|
||
class Cleanup implements IRepairStep { | ||
|
||
private $metaMapper; | ||
|
||
public function __construct(MetaMapper $metaMapper) { | ||
$this->metaMapper = $metaMapper; | ||
} | ||
|
||
/* | ||
* @inheritdoc | ||
*/ | ||
public function getName() { | ||
return 'Clean up meta table'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function run(IOutput $output) { | ||
$this->metaMapper->deleteAll(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace OCA\Notes\Migration; | ||
|
||
use Closure; | ||
use OCP\DB\ISchemaWrapper; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
class Version3005Date20200528204431 extends SimpleMigrationStep { | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
* @param array $options | ||
*/ | ||
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { | ||
} | ||
|
||
/** | ||
* @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->createTable('notes_meta'); | ||
$table->addColumn('id', 'integer', [ | ||
'autoincrement' => true, | ||
'notnull' => true, | ||
]); | ||
$table->addColumn('file_id', 'integer', [ | ||
'notnull' => true, | ||
]); | ||
$table->addColumn('user_id', 'string', [ | ||
'notnull' => true, | ||
'length' => 64, | ||
]); | ||
$table->addColumn('last_update', 'integer', [ | ||
'notnull' => true, | ||
]); | ||
$table->addColumn('etag', 'string', [ | ||
'notnull' => true, | ||
'length' => 32, | ||
]); | ||
$table->addColumn('content_etag', 'string', [ | ||
'notnull' => true, | ||
'length' => 32, | ||
]); | ||
$table->addColumn('file_etag', 'string', [ | ||
'notnull' => true, | ||
'length' => 40, | ||
]); | ||
$table->setPrimaryKey(['id']); | ||
$table->addIndex(['file_id'], 'notes_meta_file_id_index'); | ||
$table->addIndex(['user_id'], 'notes_meta_user_id_index'); | ||
$table->addUniqueIndex(['file_id', 'user_id'], 'notes_meta_file_user_index'); | ||
|
||
return $schema; | ||
} | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
* @param array $options | ||
*/ | ||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { | ||
} | ||
} |
Oops, something went wrong.