You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin-manual/upgrade-instructions.md
+87Lines changed: 87 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,3 +13,90 @@ When migration from `3.5.2` to `3.5.3` make sure that you don't have in database
13
13
Though it was possible before 3.5.3 under certain circumstances to create users with either one or both of these two columns set to NULL, it is very unlikely that this case is relevant for you.
14
14
In case you have some - please delete these entries (`DELETE users WHERE home_folder_id IS NULL OR inbox_folder_id IS NULL`)
15
15
No worries about deleting user entity with NULL value for `home_folder_id` or `home_folder_id` as such entities are stale anyway - they have no documents associated and no login is possible.
16
+
17
+
18
+
## 3.6 (not yet released)
19
+
20
+
Here’s a clean version of the migration note you wrote, with steps clearly structured for admins who need to ensure `users.created_by` and `users.updated_by` are populated correctly:
21
+
22
+
---
23
+
24
+
### Audit Feature Migration (v3.6)
25
+
26
+
Starting with **version 3.6**, Papermerge introduces the **Audit feature**, which records *who did what and when*.
27
+
This affects almost all database tables, which now include audit columns:
28
+
29
+
*`created_at`
30
+
*`created_by`
31
+
*`updated_at`
32
+
*`updated_by`
33
+
34
+
There are couple more, but they are irrelevant here.
35
+
The most critical change:
36
+
37
+
👉 The `users` table **must have non-empty values for `created_by` and `updated_by`.**
38
+
39
+
---
40
+
41
+
#### How to Fix Existing `users` Rows
42
+
43
+
If you are upgrading, you must manually update `users.created_by` and `users.updated_by` to valid user IDs (for example, your administrator user).
44
+
45
+
⚠️ **Important:** You must **disable** the trigger `set_created_by_updated_by_trigger_users` before updating, otherwise the update will not work.
46
+
47
+
---
48
+
49
+
#### Step 1: Find your admin’s user ID
50
+
51
+
```sql
52
+
SELECT id, username, updated_by, created_by FROM users;
0 commit comments