Commit Graph

36 Commits

Author SHA1 Message Date
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 #23004

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 #19761 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
Daniel Kesselberg f15df262c9
Install new instances with bigint filecache
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-01-04 17:07:27 +01:00
Roeland Jago Douma b82cbe04df
Add uid_owner and uid_initiator share tabe indices
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-01 23:59:36 +02:00
Robin Appelman 91d3e48ab3
Add filecache index on mtime
Gives searching by mtime and "recent" a proper index to use

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-07-19 17:43:20 +02:00
Roeland Jago Douma 2f59f389d2
Add parent index to share table
Fixes #9327

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-03 13:36:02 +02:00
Joas Schilling 4a5282ba21
Fix the type hints of migrations and correctly inject the wrapped schema into migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-17 11:37:36 +01:00
Bjoern Schiessle de98581421
add index for share_with table for newly created tables
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-12-18 21:14:45 +01:00
Joas Schilling 697d4c8847
Install new instances with bigint filecache
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-13 11:25:24 +02:00
Joas Schilling d5c2b98207
Fix missing "unsigned" on integer columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-19 20:09:10 +02:00
Joas Schilling 1c2f628d8e
Fix headers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-14 09:53:48 +02:00
Joas Schilling 5e04254d40
Install from migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-25 12:47:37 +02:00