Joas Schilling
92fc12918e
fix(migrations): Help developers to add description and copyright info
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 4 mēnešiem
Johannes Merkel
06d076410a
feat(occ): add possibility to edit indices
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
pirms 5 mēnešiem
Josh
7ce0088737
fix(db): db-convert supports disabled apps but not removed ones
Signed-off-by: Josh <josh.t.richards@gmail.com>
pirms 4 mēnešiem
Côme Chilliet
51758117a7
Migrate database pending bigint conversions check to new API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 7 mēnešiem
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>
pirms 7 mēnešiem
Christoph Wurst
5f0ada879e
fix(db): Print why the migration file could not be created
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 11 mēnešiem
Joas Schilling
ab70bbd3ff
fix(db)!: Remove private legacy event because we can not keep it
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Joas Schilling
86310a35b2
fix(db): Move missing core indices to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Joas Schilling
00d483585b
fix: Add options to support all used features by core
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Joas Schilling
f73f14207c
fix(db): Move missing core columns to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Joas Schilling
77c2b169a5
fix(db): Move missing core primary keys to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Joas Schilling
bd0a149a4f
feat(dispatcher): Add typed event for "db:add-missing-primary-keys"
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Joas Schilling
2eded24eff
feat(dispatcher): Add typed event for "db:add-missing-columns"
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 11 mēnešiem
Julius Härtl
925bcebcb6
feat: Add public event for missing indices
Signed-off-by: Julius Härtl <jus@bitgrid.net>
pirms 11 mēnešiem
Arthur Schiwon
e5160e0c1c
fix(db): no hardcoded table prefix is expected
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 11 mēnešiem
Marcel Klehr
fcf1c3033b
fix(systemtags): Add missing systemtags index
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pirms 1 gada
Faraz Samapoor
1e8ec53b8c
Update core/Command/Db/ConvertType.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
pirms 1 gada
Faraz Samapoor
73d7c45ae1
Update core/Command/Db/ConvertFilecacheBigInt.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
pirms 1 gada
Faraz Samapoor
d34cafc58c
Update core/Command/Db/Migrations/MigrateCommand.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
pirms 1 gada
Faraz Samapoor
f1a19a10fc
Update core/Command/Db/Migrations/StatusCommand.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
pirms 1 gada
Faraz Samapoor
b5cbba7fc1
Uses PHP8's constructor property promotion in core/Command/Db classes.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
pirms 1 gada
Robin Appelman
db43d90387
add new index in repair step instead of on-migrate
Signed-off-by: Robin Appelman <robin@icewind.nl>
pirms 1 gada
Louis Chemineau
bda66f9fb6
Add parent index on filecache
Signed-off-by: Louis Chemineau <louis@chmn.me>
pirms 1 gada
Vitor Mattos
fd4c53f311
Fix typo that added a letter to migration template
Signed-off-by: Vitor Mattos <vitor@php.rio>
pirms 1 gada
Roeland Jago Douma
aaf9b9c4fd
properly typehint generated migrations
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pirms 1 gada
timm2k
6ff58d30b4
Update ConvertFilecacheBigInt.php
Signed-off-by: timm2k <timm2k@gmx.de>
pirms 1 gada
Marcel Klehr
047cc708d4
DB mounts table: Add index for mount_provider_class
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pirms 1 gada
Carl Schwan
b70c6a128f
Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pirms 2 gadiem
Joas Schilling
60801d8b1c
Fix strict comparison
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 2 gadiem
Joas Schilling
2ffcc08332
Fix type fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 2 gadiem
Joas Schilling
7ee982005a
Give hints on correct migration versioning
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 2 gadiem
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>
pirms 2 gadiem
Arthur Schiwon
ee006563ae
migration generator also includes copyright section
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 2 gadiem
Côme Chilliet
ea23523c70
Adapt more code to migration to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 2 gadiem
Louis Chemineau
970fb7ce65
Don't create cards_abiduri it if already exists
Signed-off-by: Louis Chemineau <louis@chmn.me>
pirms 2 gadiem
Louis Chemineau
405c5eb813
Add --dry-run option for db:add-missing-* cmd
Signed-off-by: Louis Chemineau <louis@chmn.me>
pirms 2 gadiem
Carl Schwan
db6927ee05
Improve performance when converting between DBs
Use a transaction when doing multiple inserts increase the writing
speed.
Ref: https://stackoverflow.com/a/68495887
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pirms 2 gadiem
Julius Härtl
415294e345
Add index for direct editing cleanup job
Signed-off-by: Julius Härtl <jus@bitgrid.net>
pirms 2 gadiem
Carl Schwan
6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pirms 2 gadiem
Christoph Wurst
ed84f07784
Add missing index for propertypath only queries against properties
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 2 gadiem
Joas Schilling
536a812de4
Add an index for selecting the next job
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 2 gadiem
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>
pirms 2 gadiem
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>
pirms 3 gadiem
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>
pirms 2 gadiem
Christoph Wurst
bf564e2a5a
Convert command option defaults to strings
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 3 gadiem
Daniel Kesselberg
11cacf63f8
Fix #26085
addOrderBy expects a order expression. For the migration scenario we have column objects. Column objects are not supported by quoteColumnName yet.
A column object as order expression is most likely an edgy thing when migration database information.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pirms 3 gadiem
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pirms 3 gadiem
Roeland Jago Douma
14ee17e5c5
Revert "add a prefix index to filecache.path"
pirms 3 gadiem
Morris Jobke
ab48d5e8cb
Cleanup unneeded code around database.xml
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pirms 3 gadiem
Joas Schilling
bb0c50717c
Bye bye database.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 4 gadiem