summaryrefslogtreecommitdiffstats
path: root/core/Command/Db
Commit message (Collapse)AuthorAgeFilesLines
* fix(db): db-convert supports disabled apps but not removed onesJosh2024-03-071-1/+1
| | | Signed-off-by: Josh <josh.t.richards@gmail.com>
* Migrate database pending bigint conversions check to new APICôme Chilliet2024-01-151-3/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-233-3/+3
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(db): Print why the migration file could not be createdChristoph Wurst2023-11-221-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(db)!: Remove private legacy event because we can not keep itJoas Schilling2023-07-243-27/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Move missing core indices to typed eventJoas Schilling2023-07-241-416/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Add options to support all used features by coreJoas Schilling2023-07-241-1/+17
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Move missing core columns to typed eventJoas Schilling2023-07-241-36/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(db): Move missing core primary keys to typed eventJoas Schilling2023-07-241-121/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(dispatcher): Add typed event for "db:add-missing-primary-keys"Joas Schilling2023-07-241-7/+48
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(dispatcher): Add typed event for "db:add-missing-columns"Joas Schilling2023-07-241-9/+43
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #39389 from nextcloud/enh/add-missing-indices-eventJulius Härtl2023-07-141-1/+30
|\
| * feat: Add public event for missing indicesJulius Härtl2023-07-141-1/+30
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | fix(db): no hardcoded table prefix is expectedArthur Schiwon2023-07-131-2/+2
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(systemtags): Add missing systemtags indexMarcel Klehr2023-06-211-0/+13
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Update core/Command/Db/ConvertType.phpFaraz Samapoor2023-06-191-1/+1
| | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Update core/Command/Db/ConvertFilecacheBigInt.phpFaraz Samapoor2023-06-191-1/+3
| | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Update core/Command/Db/Migrations/MigrateCommand.phpFaraz Samapoor2023-06-191-1/+3
| | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Update core/Command/Db/Migrations/StatusCommand.phpFaraz Samapoor2023-06-191-1/+3
| | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Uses PHP8's constructor property promotion in core/Command/Db classes.Faraz Samapoor2023-06-199-58/+27
| | | | Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* add new index in repair step instead of on-migrateRobin Appelman2023-04-281-0/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add parent index on filecacheLouis Chemineau2023-03-201-0/+10
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Fix typo that added a letter to migration templateVitor Mattos2023-02-251-1/+1
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* properly typehint generated migrationsRoeland Jago Douma2022-10-091-4/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update ConvertFilecacheBigInt.phptimm2k2022-09-141-0/+1
| | | Signed-off-by: timm2k <timm2k@gmx.de>
* DB mounts table: Add index for mount_provider_classMarcel Klehr2022-08-011-0/+13
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Update core to PHP 7.4 standardCarl Schwan2022-05-2010-79/+19
| | | | | | | - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix strict comparisonJoas Schilling2022-04-271-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix type fixingJoas Schilling2022-04-251-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Give hints on correct migration versioningJoas Schilling2022-04-251-0/+32
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Additional index on oc_preferences to make sure that gettingh values without ↵Julius Härtl2022-04-191-0/+13
| | | | | | a user filter is fast Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #31735 from nextcloud/fix/noid/mig-generator-copyrightCôme Chilliet2022-03-291-0/+24
|\ | | | | migration generator also includes copyright section
| * migration generator also includes copyright sectionArthur Schiwon2022-03-281-0/+24
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Merge pull request #31609 from nextcloud/fix/migrate-away-from-iloggerCôme Chilliet2022-03-291-10/+8
|\ \ | |/ |/| Migrate from ILogger to LoggerInterface in lib/private
| * Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-241-10/+8
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Don't create cards_abiduri it if already existsLouis Chemineau2022-03-241-5/+9
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #31304 from nextcloud/feature/dry_run_for_add_indicesChristoph Wurst2022-02-283-37/+130
|\ | | | | Add --dry-run option for add-missing-* cmd
| * Add --dry-run option for db:add-missing-* cmdLouis Chemineau2022-02-243-37/+130
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Improve performance when converting between DBsCarl Schwan2022-02-161-15/+25
|/ | | | | | | | | 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>
* Add index for direct editing cleanup jobJulius Härtl2022-02-071-0/+13
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Check style updateCarl Schwan2022-01-132-2/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add missing index for propertypath only queries against propertiesChristoph Wurst2021-12-231-0/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add an index for selecting the next jobJoas Schilling2021-12-011-0/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* disable path prefix index on postgresql for nowRobin Appelman2021-10-081-1/+2
| | | | | | | 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>
* add a prefix index to filecache.pathRobin Appelman2021-10-081-0/+7
| | | | | | | | | | | | 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>
* add better index for finding unindexed pathsRobin Appelman2021-10-071-0/+7
| | | | | | | | | | 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>
* Convert command option defaults to stringsChristoph Wurst2021-06-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #27429 from nextcloud/bug/26085/wrong-data-add-order-byChristoph Wurst2021-06-091-5/+2
|\ | | | | Don't pass a column object to addOrderBy
| * Fix #26085Daniel Kesselberg2021-06-081-5/+2
| | | | | | | | | | | | | | | | 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>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0410-15/+12
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>