diff --git a/appinfo/database.xml b/appinfo/database.xml deleted file mode 100755 index 7372a3f..0000000 --- a/appinfo/database.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - *dbname* - true - false - utf8 - - *dbprefix*grauphel_oauth_tokens - - - token_id - integer - 11 - true - 1 - 0 - - - token_user - text - 64 - false - - - token_type - text - 16 - true - - - token_key - text - 128 - true - - - token_secret - text - 128 - true - - - token_verifier - text - 128 - true - - - token_callback - text - 2048 - true - - - token_client - text - 256 - true - - - token_lastuse - timestamp - true - - -
- - - *dbprefix*grauphel_notes - - - note_id - integer - 11 - true - 1 - 0 - - - note_user - text - 64 - false - - - - note_guid - text - 128 - true - - - note_last_sync_revision - integer - 11 - true - 0 - - - - note_create_date - text - 33 - true - - - note_last_change_date - text - 33 - true - - - note_last_metadata_change_date - text - 33 - true - - - - note_title - text - 1024 - true - - - note_content - clob - true - - - note_content_version - text - 16 - true - - - note_open_on_startup - integer - 1 - true - 0 - - - note_pinned - integer - 1 - true - 0 - - - note_tags - text - 1024 - true - - -
- - - *dbprefix*grauphel_syncdata - - - syncdata_id - integer - 11 - true - 1 - 0 - - - syncdata_user - text - 64 - true - - - syncdata_current_sync_guid - text - 64 - true - - - syncdata_latest_sync_revision - integer - 11 - true - 0 - - -
-
diff --git a/appinfo/info.xml b/appinfo/info.xml index 3a94e3d..586a0d0 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,7 +9,7 @@ Tomboy, Conboy and Tomdroid clients are supported. - 1.0.1 + 1.0.2 agpl Joan Moreau Grauphel @@ -19,7 +19,6 @@ https://github.com/grosjo/nextcloud-grauphel.git OAuth - - + diff --git a/appinfo/version b/appinfo/version index 7dea76e..6d7de6e 100755 --- a/appinfo/version +++ b/appinfo/version @@ -1 +1 @@ -1.0.1 +1.0.2 diff --git a/lib/Migration/Version010002Date20220103070900.php b/lib/Migration/Version010002Date20220103070900.php new file mode 100644 index 0000000..c606f91 --- /dev/null +++ b/lib/Migration/Version010002Date20220103070900.php @@ -0,0 +1,62 @@ +hasTable('grauphel_oauth_tokens')) + { + $table = $schema->createTable('grauphel_oauth_tokens'); + $table->addColumn('token_id', 'integer', [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, 'default' => 0 ]); + $table->addColumn('token_user', 'text', [ 'length' => 64, 'notnull' => false ]); + $table->addColumn('token_type', 'text', [ 'length' => 16, 'notnull' => true ]); + $table->addColumn('token_key', 'text', [ 'length' => 128, 'notnull' => true ]); + $table->addColumn('token_secret', 'text', [ 'length' => 128, 'notnull' => true ]); + $table->addColumn('token_verifier', 'text', [ 'length' => 128, 'notnull' => true ]); + $table->addColumn('token_callback', 'text', [ 'length' => 2048, 'notnull' => true ]); + $table->addColumn('token_client', 'text', [ 'length' => 256, 'notnull' => true ]); + $table->addColumn('token_lastuse', 'timestamp', [ 'notnull' => true ]); + $table->setPrimaryKey(['token_id']); + } + + if (!$schema->hasTable('grauphel_notes')) + { + $table = $schema->createTable('grauphel_notes'); + $table->addColumn('note_id', 'integer', [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, 'default' => 0 ]); + $table->addColumn('note_user', 'text', [ 'length' => 64, 'notnull' => false ]); + $table->addColumn('note_guid', 'text', [ 'length' => 128, 'notnull' => true ]); + $table->addColumn('note_last_sync_revision', 'integer', [ 'notnull' => true, 'length' => 20, 'default' => 0 ]); + $table->addColumn('note_create_date', 'text', [ 'length' => 33, 'notnull' => true ]); + $table->addColumn('note_last_change_date', 'text', [ 'length' => 33, 'notnull' => true ]); + $table->addColumn('note_last_metadata_change_date', 'text', [ 'length' => 33, 'notnull' => true ]); + $table->addColumn('note_title', 'text', [ 'length' => 1024, 'notnull' => true ]); + $table->addColumn('note_content', 'clob', [ 'notnull' => true ]); + $table->addColumn('note_content_version', 'text', [ 'length' => 16, 'notnull' => true ]); + $table->addColumn('note_open_on_startup', 'integer', [ 'length' => 1, 'notnull' => true, 'default' => 0 ]); + $table->addColumn('note_pinned', 'integer', [ 'length' => 1, 'notnull' => true, 'default' => 0 ]); + $table->addColumn('note_tags', 'text', [ 'length' => 1024, 'notnull' => true ]); + $table->setPrimaryKey(['note_id']); + } + + if (!$schema->hasTable('grauphel_syncdata')) + { + $table = $schema->createTable('grauphel_syncdata'); + $table->addColumn('syncdata_id', 'integer', [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, 'default' => 0 ]); + $table->addColumn('syncdata_user', 'text', [ 'length' => 64, 'notnull' => true ]); + $table->addColumn('syncdata_current_sync_guid', 'text', [ 'length' => 64, 'notnull' => true ]); + $table->addColumn('syncdata_latest_sync_revision', 'integer', [ 'length' => 20, 'notnull' => true, 'default' => 0 ]); + $table->setPrimaryKey(['syncdata_id']); + } + + return $schema; + } +}