[PR #163] [CLOSED] Digest size and validation #562

Closed
opened 2026-02-25 21:32:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ciur/papermerge/pull/163
Author: @francescocarzaniga
Created: 10/13/2020
Status: Closed

Base: masterHead: db


📝 Commits (3)

  • bcd1eb7 Fixed digest size and validation
  • e50cdc8 Fixed mysql requirements
  • 53f2770 Fix for no actual digest

📊 Changes

4 files changed (+17 additions, -7 deletions)

View changed files

📝 config/settings/base.py (+0 -2)
📝 papermerge/core/migrations/0001_initial.py (+1 -1)
📝 papermerge/core/models/document.py (+15 -3)
📝 papermerge/core/views/documents.py (+1 -1)

📄 Description

Digest database size is way too big and due to uniqueness was interfering with MySQL databases without innodb_large_prefix on. Now model performs correct validation of user+digest and MySQL constraints can be removed.
The digest is actually not generated though. It would probably be a good idea to user DocumentImporter also in the upload view and put the logic there.

Also I would have changed a few of the lengths in the model fields (1024 character file name? seems a bit excessive...) but I left it out since this is purely a design choice.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ciur/papermerge/pull/163 **Author:** [@francescocarzaniga](https://github.com/francescocarzaniga) **Created:** 10/13/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `db` --- ### 📝 Commits (3) - [`bcd1eb7`](https://github.com/ciur/papermerge/commit/bcd1eb752c4a0258a8877e9af45eaee3919abb96) Fixed digest size and validation - [`e50cdc8`](https://github.com/ciur/papermerge/commit/e50cdc81788a9e6e0d25fc1f89b2413eaade9a0d) Fixed mysql requirements - [`53f2770`](https://github.com/ciur/papermerge/commit/53f2770877d8df46c4b3aac3272b7e922df9f426) Fix for no actual digest ### 📊 Changes **4 files changed** (+17 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `config/settings/base.py` (+0 -2) 📝 `papermerge/core/migrations/0001_initial.py` (+1 -1) 📝 `papermerge/core/models/document.py` (+15 -3) 📝 `papermerge/core/views/documents.py` (+1 -1) </details> ### 📄 Description Digest database size is way too big and due to uniqueness was interfering with MySQL databases without innodb_large_prefix on. Now model performs correct validation of user+digest and MySQL constraints can be removed. The digest is actually not generated though. It would probably be a good idea to user DocumentImporter also in the upload view and put the logic there. Also I would have changed a few of the lengths in the model fields (1024 character file name? seems a bit excessive...) but I left it out since this is purely a design choice. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:32:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#562
No description provided.