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