summaryrefslogtreecommitdiffstats
path: root/core/Migrations/Version13000Date20170718121200.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-19/+19
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Uses PHP8's constructor property promotion.Faraz Samapoor2023-06-231-5/+3
| | | | Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* fix(systemtags): Keep non-existing indexMarcel Klehr2023-06-221-0/+1
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix(systemtags): Move index creation from new migration to existing original ↵Marcel Klehr2023-06-221-1/+1
| | | | | | migration Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* allow storing multiple mounts for the same rootid in the mount cacheRobin Appelman2023-04-281-1/+1
| | | | | | | | | | | | currently `[$userId, $rootId]` is used as the unique key for storing mounts in the mount cache, however there are cases where the same rootid is mounted in multiple places for a user which currently leads to not all of those mounts being added to the cache. Previously this didn't matter as the mount cache was only used to list users with access to a specific file, so a user having access to the file multiple times didn' change anything. With 24 the mount cache is used for more cases and multiple mounts for the same id becomes relevant. While I think there isn't a real negative effect atm besides missing the optimized path we should ensure that the mounts are properly listed Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add parent index on filecacheLouis Chemineau2023-03-201-0/+1
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Additional index on oc_preferences to make sure that gettingh values without ↵Julius Härtl2022-04-191-0/+1
| | | | | | a user filter is fast Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add missing index for propertypath only queries against propertiesChristoph Wurst2021-12-231-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add an index for selecting the next jobJoas Schilling2021-12-011-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* disable path prefix index on postgresql for nowRobin Appelman2021-10-081-1/+4
| | | | | | | 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/+1
| | | | | | | | | | | | 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/+1
| | | | | | | | | | 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>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Revert "add a prefix index to filecache.path"Roeland Jago Douma2021-04-081-1/+0
|
* add a prefix index to filecache.pathRobin Appelman2021-03-191-0/+1
| | | | | | | | | | | | 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>
* Migrate internal classes to the OCP db col typesChristoph Wurst2021-01-121-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-1/+1
| | | | | | 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>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change further columns to be nullable with a default of 0Julius Härtl2020-12-091-10/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Handle oc_dav_properties migrationJulius Härtl2020-12-091-0/+75
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add missing mount_id indexJulius Härtl2020-12-091-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Adjust execution duration to 0Vincent Petry2020-12-091-0/+6
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix missing authtoken scopeJulius Härtl2020-12-091-0/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add missing table columnsJulius Härtl2020-12-091-0/+14
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Create primary keys on all tables and add a command to create the afterwardsJoas Schilling2020-11-101-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Replace the credentials table with one that can have empty userJoas Schilling2020-11-101-16/+16
| | | | | | Primary key columns on Oracle can not have empty strings Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure columns with an empty default are nullable for OracleJoas Schilling2020-11-101-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* add size index for filecacheRobin Appelman2020-09-221-0/+1
| | | | | | improves performance of #23004 Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Replace TYPE with TYPESDaniel Kesselberg2020-06-301-13/+13
| | | | | | As TYPE::* is deprecated. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Add index to properties tableMario Danic2020-04-301-0/+1
| | | | Signed-off-by: Mario Danic <mario@lovelyhq.com>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | 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>
* Merge pull request #19761 from ↵Roeland Jago Douma2020-04-061-3/+6
|\ | | | | | | | | nextcloud/bugfix/19658/add_missing_index_to_original_migration Add missing index to original migration
| * Create Mount IDs as BigInt by defaultGeorg Ehrke2020-03-031-3/+6
| | | | | | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* | Add optional column oc_comments.reference_idJoas Schilling2020-03-311-0/+4
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2019-12-051-1/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * 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>
* Fix authtoken index lengthRoeland Jago Douma2019-02-051-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Install new instances with bigint filecacheDaniel Kesselberg2019-01-041-4/+4
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Add uid_owner and uid_initiator share tabe indicesRoeland Jago Douma2018-10-011-0/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add filecache index on mtimeRobin Appelman2018-07-191-0/+1
| | | | | | Gives searching by mtime and "recent" a proper index to use Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add parent index to share tableRoeland Jago Douma2018-06-031-0/+1
| | | | | | Fixes #9327 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix the type hints of migrations and correctly inject the wrapped schema ↵Joas Schilling2018-01-171-4/+4
| | | | | | into migrations Signed-off-by: Joas Schilling <coding@schilljs.com>
* add index for share_with table for newly created tablesBjoern Schiessle2017-12-181-0/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Install new instances with bigint filecacheJoas Schilling2017-10-131-14/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix missing "unsigned" on integer columnsJoas Schilling2017-09-191-17/+19
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix headersJoas Schilling2017-08-141-3/+22
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Install from migrationsJoas Schilling2017-07-251-0/+897
Signed-off-by: Joas Schilling <coding@schilljs.com>