Commit Graph

143 Commits (c203bc71ada7da3642c8465b3ffc2cd80eea6743)

Author SHA1 Message Date
Robin Appelman cfb7923e08
store mountprovider for each mount in the mounts table
this enabled more fine grained filesystem setup

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-23 18:02:33 +07:00
Vincent Petry 6f32be1cf6
Merge pull request #31042 from nextcloud/enh/direct_edit_index
Add index for direct editing cleanup job
2022-02-10 18:00:29 +07:00
Joas Schilling b765f79368
Allow apps to specify if their background job can be delayed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-07 13:54:54 +07:00
Julius Härtl 415294e345
Add index for direct editing cleanup job
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-07 09:25:27 +07:00
Joas Schilling fcb3e9a071
Add a primary key to ratelimit_entries table
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-28 16:55:16 +07:00
Vitor Mattos 9a2736bbc9
Fix column size to work with Oracle. Add unit tests
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:07 +07:00
Vitor Mattos 9efbc9c1d5
Add comments reactions
Signed-off-by: Vitor Mattos <vitor@php.rio>
2022-01-21 08:37:04 +07:00
Julius Härtl 99b2cf8339
Add hashed attribute column for indexed job existence check
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-18 14:01:24 +07:00
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07: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 +07:00
Christopher Ng c85f78db69 Migrate profile_config id column to bigint
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-12-14 00:14:13 +07:00
Christopher Ng c85ab47a11 Use bigint for autoincremented column
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-12-14 00:12:40 +07:00
Julius Härtl c92ac34711 Use proper app id (settings instead of core)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-13 19:20:10 +07:00
Joas Schilling 99006be126 Lowercase all core=>email values
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 19:20:10 +07:00
Pytal 92d3520106
Merge pull request #29996 from zordsdavini/patch-1 2021-12-09 14:56:06 +07:00
Pytal ac5bc2277e Update core/Migrations/Version23000Date20211203110726.php
Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-12-09 16:32:53 +07:00
Christopher Ng e224401a62 Fix relation "user_id" already exists migration error
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-12-03 20:29:53 +07: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 +07:00
Robin Appelman 5155f2b0c5
Merge pull request #28541 from nextcloud/path-prefix-index2
add a prefix index to filecache.path, attempt 2
2021-10-19 14:41:23 +07:00
Christopher Ng 309354852f Profile backend
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2021-10-19 04:59:35 +07: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 +07: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 +07: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 +07:00
Carl Schwan 6958d8005a
Add admin privilege delegation for admin settings
This makes it possible for selected groups to access some settings
pages.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-09-29 21:43:31 +07:00
Lukas Reschke 474a5b55d3 Implement review feedback
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-13 11:01:35 +07:00
Lukas Reschke 358eaba7dd
Apply suggestions from code review
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>

Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
2021-09-13 10:43:01 +07:00
Lukas Reschke 471167019c Implement PR review feedback
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-07 18:03:34 +07:00
Lukas Reschke a915372c56 phpcs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-06 17:50:23 +07:00
Lukas Reschke 378cc922c4 Adjust logic to store period instead of current timestamp
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-06 17:31:36 +07:00
Lukas Reschke d4f97affc1 Add database ratelimiting backend
In case no distributed memory cache is specified this adds
a database backend for ratelimit purposes.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-06 16:31:01 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Roeland Jago Douma 14ee17e5c5
Revert "add a prefix index to filecache.path" 2021-04-08 10:09:13 +07: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 +07:00
Joas Schilling 47e14c9a79
Add missing index on the user column
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-17 09:51:31 +07:00
Joas Schilling f1bb4e5699
Add a KnownUsers database with model
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 15:05:48 +07:00
Roeland Jago Douma 2ea3cb7c93 Drop redundant indes
Those indexes are already covered by others. So those can just be used.
THose extra indexes just take up space.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-02-16 11:38:43 +07:00
Roeland Jago Douma 3d61adc908
Drop authtoken_version_index
The index was used when deleting old tokens. On top of that the index is
of course not that great since the version is either 1 or 2.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-01-20 09:34:41 +07: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 +07:00
Morris Jobke 5ed673e5eb
Merge pull request #25073 from nextcloud/psalm/24521/remove-unneeded-casts
Remove unneeded casts that were found by Psalm
2021-01-11 14:15:16 +07: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 +07:00
Vincent Petry 2a93c403a4
Don't remove assignable column for now
It causes side effects.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-01-11 11:58:14 +07:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +07:00
Joas Schilling 30c603c6b2
Fix column name to check prior to deleting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-01-07 10:50:36 +07: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 +07: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 +07: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 +07:00
Julius Härtl 3c9218ab26
Move authtoken login_name column to varchar(255)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:34 +07: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 +07:00
Julius Härtl fe80a65c3e
Drop attributes on oc_share table
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:34 +07:00
Julius Härtl f276ccbbc3
Drop assignable systemtag column
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 12:13:34 +07:00