Commit graph

14 commits

Author SHA1 Message Date
provokateurin
fe9e43c165
feat(preview): Expire previews
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-10 15:35:38 +01:00
Anna Larch
99a1150ec2 fix(snowflake): cast lastId to int
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-02-09 21:36:20 +01:00
Anna Larch
5f797ebc32
refactor: move existing usages of snoflake IDs SnowflakeAwareEntity
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-01-06 12:57:17 +01:00
Anna Larch
f546daada7
refactor: Rename Snowflake Generator and Decoder
And introduce the Snowflake DTO

Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-01-06 12:57:04 +01:00
Carl Schwan
06b6a5bc05
fix(preview): Correctly insert preview version
Use createNamedParameter otherwise values are not correctly escapted.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 18:23:53 +01:00
Carl Schwan
336cc3fa35 feat(Db): Use SnowflakeId for previews
Allow to get an id for the storing the preview on disk before inserting
the preview on the DB.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-28 17:50:03 +01:00
Carl Schwan
bef3996c3e fix(preview): Make version column a string
And move it to a different table so that we don't have to pay the
storage cost when not using it (most of the times).

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-08 14:07:06 +02:00
Carl Schwan
66f50bd585 refactor(preview): Use same mimetype ids as filecache
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
58023782b6 feat(preview): Store original file mimetype in preview table
Allow to quickly query all the files from a specific mimetype like in
the ResetRenderedTexts command.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
324b54b863 refactor(preview): Cleanup the implementation of the new preview backend
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
6f56dcf73e fix(preview): Fix some tests
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
b0357663b9 perf(preview): Optimize migration and simplify DB layout
* Simplify migration by not moving the actual files and just updating
  the DB
* Don't store the storageid in the preview table as it is not needed
* Start adding tests

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
bba9667882 perf(preview): Adapt BackgroundCleanupJob to new previews table
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +02:00
Carl Schwan
18fbacdd8d perf(preview): Split preview data to new table
The new oc_previews table is optimized for storing previews and should
decrease significantly the space taken by previews in the filecache
table.

This attend to reuse the IObjectStore abstraction over S3/Swift/Azure
but currently only support one single bucket configuration.

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-10-06 13:37:15 +02:00