0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-25 09:20:16 +00:00
Commit graph

60 commits

Author SHA1 Message Date
skjnldsv
57ffca36a7 fix(systemtags): objecttype index registration
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-01-15 17:03:03 +01:00
Christoph Wurst
73079a6cf3
fix(db): Create the systag_by_objectid index for new installations
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-12-05 17:50:54 +01:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
Git'Fellow
3803e755af
fix(migration): Add column if not exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-08-07 20:09:51 +02:00
Joas Schilling
829f2b9bc7
fix(db): Promote the use of getDatabaseProvider to reduce the impage of removed upstream platforms
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:14 +02:00
Andy Scherzinger
5c49a54801
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-26 20:05:04 +02:00
Varun Patil
84017a9ad7 fix(core): add fs_name_hash index to migration
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2024-04-30 12:24:23 -07:00
Johannes Merkel
21e8aadc1f
fix(db): remove redundant indices in properties
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
2024-02-18 21:02:42 +01:00
Julius Härtl
1cfc8a2e03
Revert "perf: Add partial index on configvalue of preferences table"
This reverts commit 0ccf84bb31.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-12-06 15:21:48 +01:00
Julius Härtl
0ccf84bb31
perf: Add partial index on configvalue of preferences table
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-11-30 20:51:48 +01:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Faraz Samapoor
04b12d9d27 Uses PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
2023-06-23 22:50:49 +03:30
Marcel Klehr
e774708482 fix(systemtags): Keep non-existing index
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-06-22 10:12:15 +02:00
Marcel Klehr
ee9ad9c9de fix(systemtags): Move index creation from new migration to existing original migration
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-06-22 09:49:53 +02:00
Robin Appelman
f5e2b0b22f
allow storing multiple mounts for the same rootid in the mount cache
currently `[$userId, $rootId]` is used as the unique key for storing mounts in the mount cache,
however there are cases where the same rootid is mounted in multiple places for a user which currently leads to not all of those mounts being added to the cache.

Previously this didn't matter as the mount cache was only used to list users with access to a specific file, so a user having access to the file multiple times didn' change anything.

With 24 the mount cache is used for more cases and multiple mounts for the same id becomes relevant.
While I think there isn't a real negative effect atm besides missing the optimized path we should ensure that the mounts are properly listed

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-28 15:08:08 +02:00
Louis Chemineau
bda66f9fb6 Add parent index on filecache
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-03-20 15:02:23 +00:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Julius Härtl
7fbd93b2ad
Additional index on oc_preferences to make sure that gettingh values without a user filter is fast
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-19 12:37:36 +02:00
Christoph Wurst
ed84f07784
Add missing index for propertypath only queries against properties
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-23 15:51:50 +01:00
Joas Schilling
536a812de4
Add an index for selecting the next job
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 23:57:40 +01:00
Robin Appelman
695326534c
disable path prefix index on postgresql for now
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement.
to prevent making it harder to add the correct index later on we don't create the index for now on postgresql

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:39:22 +02:00
Robin Appelman
abd6b354ac
add a prefix index to filecache.path
The reason that `filecache.path` hasn't had an index added is the mysql limitation of ~1kb for indexeded fields,
which is to small for the `path`, however mysql supports indexing only the first N bytes of a column instead of the entire column,
allowing us to add an index even if the column is to long.

Because the index doesn't cover the entire column it can't be used in all situations where a normal index would be used, but it does cover the `path like 'folder/path/%'` queries that are used in various places.

Sqlite and Postgresql don't support prefix indexes, but they also don't have the 1kb limit and DBAL handles the differences in index creation.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:38:25 +02:00
Robin Appelman
6502dfae34
add better index for finding unindexed paths
for the following query 'SELECT "path" FROM "oc_filecache" WHERE ("storage" = $storage) AND ("size" < 0) ORDER BY "fileid" DESC LIMIT 1;'

currently the database will in some cases decide to priorize the sort by fileid over the filter when picking what index to use, resulting in a much slower query.

by creating an index that allows first sorting by fileid and also filter by storage and size this case will be greatly sped up

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-07 16:11:49 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Roeland Jago Douma
14ee17e5c5
Revert "add a prefix index to filecache.path" 2021-04-08 10:09:13 +02:00
Robin Appelman
b28f0a0e94
add a prefix index to filecache.path
The reason that `filecache.path` hasn't had an index added is the mysql limitation of ~1kb for indexeded fields,
which is to small for the `path`, however mysql supports indexing only the first N bytes of a column instead of the entire column,
allowing us to add an index even if the column is to long.

Because the index doesn't cover the entire column it can't be used in all situations where a normal index would be used, but it does cover the `path like 'folder/path/%'` queries that are used in various places.

Sqlite and Postgresql don't support prefix indexes, but they also don't have the 1kb limit and DBAL handles the differences in index creation.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 18:52:25 +01:00
Christoph Wurst
c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-12 14:09:13 +01:00
Morris Jobke
24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Julius Härtl
0befe07127
Change further columns to be nullable with a default of 0
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 15:23:29 +01:00
Julius Härtl
28491ad2d8
Handle oc_dav_properties migration
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:35 +01:00
Julius Härtl
76addfa44c
Add missing mount_id index
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:34 +01:00
Vincent Petry
ab43d6a11e
Adjust execution duration to 0
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-12-09 12:13:33 +01:00
Julius Härtl
83f4f480ab
Fix missing authtoken scope
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:32 +01:00
Julius Härtl
9c2e9f2625
Add missing table columns
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:32 +01:00
Joas Schilling
d5df033ede
Create primary keys on all tables and add a command to create the afterwards
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:36:27 +01:00
Joas Schilling
5b5aebbf66
Replace the credentials table with one that can have empty user
Primary key columns on Oracle can not have empty strings

Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:36:27 +01:00
Joas Schilling
ecbb066dec
Make sure columns with an empty default are nullable for Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:35:16 +01:00
Robin Appelman
634c051be6
add size index for filecache
improves performance of 

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-22 15:15:34 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Daniel Kesselberg
87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-30 23:46:22 +02:00
Mario Danic
6e28c2807b
Add index to properties table
Signed-off-by: Mario Danic <mario@lovelyhq.com>
2020-04-30 23:04:15 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Roeland Jago Douma
9a4193f557
Merge pull request from nextcloud/bugfix/19658/add_missing_index_to_original_migration
Add missing index to original migration
2020-04-06 09:44:34 +02:00
Joas Schilling
720dc4e93d
Add optional column oc_comments.reference_id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-31 10:51:15 +02:00
Georg Ehrke
79dcd34a07
Create Mount IDs as BigInt by default
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-03-03 14:17:22 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma
348d9cba06
Fix authtoken index length
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-05 13:00:34 +01:00