diff --git a/CHANGELOG.md b/CHANGELOG.md
index 206f0f3..4f1c92d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.5.1 - 2024-12-29
+### Fixed
+- Fix database installation issue on MariaDB/MySQL when column length exceeded maximum key length (3072 bytes)
+- Reduce folder path column lengths to be compatible with all database configurations
+
## 1.5.0 - 2024-12-28
### Added
- Open folder/file in new window from duplicate details page
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 660cec8..b5d9d70 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -33,7 +33,7 @@
* 📊 **Aperçu & Simulation** - Visualisez ce qui serait supprimé avant d'agir
* 💼 **Traitement en Arrière-plan** - Tâches automatisées de recherche de doublons
]]>
- 1.5.0
+ 1.5.1
André Théo LAURET
DuplicateFinder
diff --git a/lib/Migration/Version0001Date20210508222200.php b/lib/Migration/Version0001Date20210508222200.php
index 053312c..5256ac2 100644
--- a/lib/Migration/Version0001Date20210508222200.php
+++ b/lib/Migration/Version0001Date20210508222200.php
@@ -28,7 +28,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
if ($table->hasColumn('path')) {
$pathColumn = $table->getColumn('path');
$pathColumn->setType(Type::getType(Types::STRING));
- $pathColumn->setOptions(['length' => 4000]);
+ $pathColumn->setOptions(['length' => 768]);
}
return $schema;
}
diff --git a/lib/Migration/Version0009Date20240116000000.php b/lib/Migration/Version0009Date20240116000000.php
index 0429c35..5eb1598 100644
--- a/lib/Migration/Version0009Date20240116000000.php
+++ b/lib/Migration/Version0009Date20240116000000.php
@@ -33,7 +33,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
]);
$table->addColumn('folder_path', 'string', [
'notnull' => true,
- 'length' => 700,
+ 'length' => 768,
]);
$table->addColumn('created_at', 'datetime', [
'notnull' => true,
diff --git a/lib/Migration/Version1040Date20240101000000.php b/lib/Migration/Version1040Date20240101000000.php
index 9d2cb39..9919d76 100644
--- a/lib/Migration/Version1040Date20240101000000.php
+++ b/lib/Migration/Version1040Date20240101000000.php
@@ -33,7 +33,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
]);
$table->addColumn('folder_path', 'string', [
'notnull' => true,
- 'length' => 4000,
+ 'length' => 768,
]);
$table->addColumn('created_at', 'datetime', [
'notnull' => true,
diff --git a/lib/Migration/Version1050Date20241228000000.php b/lib/Migration/Version1050Date20241228000000.php
new file mode 100644
index 0000000..7adf198
--- /dev/null
+++ b/lib/Migration/Version1050Date20241228000000.php
@@ -0,0 +1,53 @@
+hasTable('df_excluded_folders')) {
+ $table = $schema->getTable('df_excluded_folders');
+
+ // Drop the existing index
+ if ($table->hasIndex('df_excl_folders_unique')) {
+ $table->dropIndex('df_excl_folders_unique');
+ }
+
+ // Modify the folder_path column to use a shorter length
+ $folderPathColumn = $table->getColumn('folder_path');
+ $folderPathColumn->setLength(768);
+
+ // Recreate the index with the shorter column
+ $table->addUniqueIndex(['user_id', 'folder_path'], 'df_excl_folders_unique');
+ }
+
+ // Fix duplicatefinder_of table
+ if ($schema->hasTable('duplicatefinder_of')) {
+ $table = $schema->getTable('duplicatefinder_of');
+
+ // Drop the existing index
+ if ($table->hasIndex('df_folders_unique_idx')) {
+ $table->dropIndex('df_folders_unique_idx');
+ }
+
+ // Modify the folder_path column to use a shorter length
+ $folderPathColumn = $table->getColumn('folder_path');
+ $folderPathColumn->setLength(768);
+
+ // Recreate the index with the shorter column
+ $table->addUniqueIndex(['user_id', 'folder_path'], 'df_folders_unique_idx');
+ }
+
+ return $schema;
+ }
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 5cd0912..1448e87 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "duplicatefinder",
"description": "Save some space by finding your duplicate files",
- "version": "1.5.0",
+ "version": "1.5.1",
"author": "André Théo LAURET ",
"contributors": [],
"bugs": {