Skip to content

Commit 29e05e7

Browse files
committed
Merge branch 'stable10'
Signed-off-by: Marcel Klehr <mklehr@gmx.net> # Conflicts: # lib/Migration/Version010000001Date20250727094721.php # lib/Migration/Version010000001Date20250727094821.php
2 parents 7c4ff12 + bb3f115 commit 29e05e7

8 files changed

Lines changed: 203 additions & 71 deletions

File tree

CHANGELOG.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,80 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [10.0.4] - 2025-09-01
8+
9+
### Fixed
10+
11+
- Fix DB migration to avoid sub query
12+
13+
## [10.0.3] - 2025-09-01
14+
15+
### Fixed
16+
17+
- Fix DB migration to process column in chunks
18+
19+
## [10.0.2] - 2025-08-29
20+
21+
### Fixed
22+
23+
- Fixed faulty migration
24+
25+
## [10.0.1] - 2025-08-29
26+
27+
### Fixed
28+
* fix(mariadb): Rename vector col to face_vector
29+
* fix: Repair duplicate face detections
30+
* fix(FaceDetectionMapper): Prevent inserting duplicate face detections
31+
* fix(info.xml): Add AI category
32+
33+
## [10.0.0] - 2025-07-07
34+
35+
### Breaking changes
36+
37+
- Dropped support for Nextcloud 31
38+
39+
### New
40+
41+
* Added Support for Nextcloud 32
42+
*
43+
### Fixed
44+
* Fix(l10n): Update translations from Transifex
45+
46+
## [9.0.3] - 2025-07-07
47+
48+
### Fixed
49+
50+
- Fixed build
51+
52+
## [9.0.2] - 2025-07-07
53+
54+
### Fixed
55+
56+
* fix(AdminView): Warn about disabled systemtags app
57+
* fix(Classifier): Do not get stuck when decryption fails
58+
* fix: Don't error if movinet.enabled=false and wasm=true
59+
60+
## [9.0.1]
61+
62+
### Fixed
63+
64+
- Fix compatibility with LoggerInterface
65+
66+
## [9.0.0]
67+
68+
### Breaking changes
69+
70+
* Dropped support for Nextcloud 30
71+
72+
### New
73+
74+
* Added Support for Nextcloud 31
75+
76+
### Fixed
77+
* Fix face clustering on instances that use numeric user IDs (Thanks to @joeyame)
78+
* Fix(l10n): Update translations from Transifex
79+
80+
781
## [8.2.0]
882

983
### New

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source_dir=$(build_dir)/source
77
sign_dir=$(build_dir)/sign
88
package_name=$(app_name)
99
cert_dir=$(HOME)/.nextcloud/certificates
10-
version+=8.0.0
10+
version+=10.0.4
1111

1212
all: dev-setup build-js-production
1313

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Requirements:
7575
The app does not send any sensitive data to cloud providers or similar services. All processing is done on your Nextcloud machine, using Tensorflow.js running in Node.js.
7676
7777
]]></description>
78-
<version>10.0.0-dev.0</version>
78+
<version>10.0.4</version>
7979
<licence>agpl</licence>
8080
<author mail="mklehr@gmx.net">Marcel Klehr</author>
8181
<types>

lib/Migration/Version010000001Date20250727094721.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
use Closure;
1111
use Doctrine\DBAL\Schema\SchemaException;
1212
use OCP\DB\ISchemaWrapper;
13+
use OCP\DB\QueryBuilder\IQueryBuilder;
1314
use OCP\DB\Types;
1415
use OCP\IDBConnection;
1516
use OCP\Migration\IOutput;
1617
use OCP\Migration\SimpleMigrationStep;
18+
use PDO;
1719

1820
final class Version010000001Date20250727094721 extends SimpleMigrationStep {
1921

@@ -38,7 +40,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
3840
$table = $schema->getTable('recognize_face_detections');
3941
if (!$table->hasColumn('face_vector')) {
4042
$table->addColumn('face_vector', Types::TEXT, [
41-
'notnull' => true,
43+
'notnull' => false,
4244
]);
4345
return $schema;
4446
}
@@ -60,9 +62,25 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
6062
return;
6163
}
6264

65+
$select = $this->db->getQueryBuilder();
66+
$select->select('id')
67+
->from('recognize_face_detections')
68+
->where($select->expr()->isNull('face_vector'))
69+
->setMaxResults(1000);
70+
6371
$query = $this->db->getQueryBuilder();
6472
$query->update('recognize_face_detections')
65-
->set('face_vector', 'vector');
66-
$query->executeStatement();
73+
->set('face_vector', 'vector')
74+
->where($query->expr()->in('id', $query->createParameter('ids')));
75+
76+
do {
77+
$result = $select->executeQuery();
78+
$ids = $result->fetchAll(PDO::FETCH_COLUMN);
79+
$result->closeCursor();
80+
if (empty($ids)) {
81+
break;
82+
}
83+
$updatedRows = $query->setParameter('ids', $ids, IQueryBuilder::PARAM_INT_ARRAY)->executeStatement();
84+
} while ($updatedRows > 0);
6785
}
6886
}

lib/Migration/Version010000001Date20250727094821.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,20 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
2727
/** @var ISchemaWrapper $schema */
2828
$schema = $schemaClosure();
2929

30+
$changed = false;
3031
if ($schema->hasTable('recognize_face_detections')) {
3132
$table = $schema->getTable('recognize_face_detections');
3233
if ($table->hasColumn('vector')) {
3334
$table->dropColumn('vector');
34-
return $schema;
35+
$changed = true;
36+
}
37+
if ($table->hasColumn('face_vector')) {
38+
$table->modifyColumn('face_vector', [
39+
'notnull' => true,
40+
]);
41+
$changed = true;
3542
}
3643
}
37-
return null;
44+
return $changed ? $schema : null;
3845
}
3946
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "recognize",
3-
"version": "10.0.0-dev.0",
3+
"version": "10.0.4",
44
"description": "Image recognition in nextcloud",
55
"main": "src/classifier_imagenet.js",
66
"directories": {

0 commit comments

Comments
 (0)