aboutsummaryrefslogtreecommitdiffstats
path: root/core/Migrations
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #28541 from nextcloud/path-prefix-index2Robin Appelman2021-10-191-0/+4
|\ | | | | add a prefix index to filecache.path, attempt 2
| * 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>
* | Profile backendChristopher Ng2021-10-191-0/+69
|/ | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* 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>
* Add admin privilege delegation for admin settingsCarl Schwan2021-09-291-0/+62
| | | | | | | This makes it possible for selected groups to access some settings pages. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Implement review feedbackLukas Reschke2021-09-131-2/+2
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Apply suggestions from code review Lukas Reschke2021-09-131-2/+3
| | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
* Implement PR review feedbackLukas Reschke2021-09-071-3/+0
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* phpcsLukas Reschke2021-09-061-2/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Adjust logic to store period instead of current timestampLukas Reschke2021-09-061-2/+2
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add database ratelimiting backendLukas Reschke2021-09-061-0/+47
| | | | | | | In case no distributed memory cache is specified this adds a database backend for ratelimit purposes. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0435-74/+53
| | | | 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>
* Add missing index on the user columnJoas Schilling2021-03-171-0/+52
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a KnownUsers database with modelJoas Schilling2021-03-101-0/+69
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Drop redundant indesRoeland Jago Douma2021-02-161-0/+65
| | | | | | | Those indexes are already covered by others. So those can just be used. THose extra indexes just take up space. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Drop authtoken_version_indexRoeland Jago Douma2021-01-202-1/+55
| | | | | | | The index was used when deleting old tokens. On top of that the index is of course not that great since the version is either 1 or 2. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Migrate internal classes to the OCP db col typesChristoph Wurst2021-01-1211-11/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #25073 from nextcloud/psalm/24521/remove-unneeded-castsMorris Jobke2021-01-111-1/+1
|\ | | | | Remove unneeded casts that were found by Psalm
| * 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>
* | Don't remove assignable column for nowVincent Petry2021-01-111-7/+0
|/ | | | | | It causes side effects. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-082-6/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix column name to check prior to deletingJoas Schilling2021-01-071-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-1611-0/+32
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change further columns to be nullable with a default of 0Julius Härtl2020-12-093-11/+25
| | | | 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>
* Move authtoken login_name column to varchar(255)Julius Härtl2020-12-091-0/+8
| | | | 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>
* Drop attributes on oc_share tableJulius Härtl2020-12-091-0/+7
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Drop assignable systemtag columnJulius Härtl2020-12-091-0/+7
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Drop oc_dav_job_status tableJulius Härtl2020-12-091-0/+23
| | | | 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-092-2/+25
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add a database table for the accounts data so we can search it betterJoas Schilling2020-12-071-0/+75
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #24053 from nextcloud/bugfix/noid/fix-user-status-for-oracleJulius Härtl2020-11-122-1/+62
|\
| * Also make direct_edit.accessed nullableJoas Schilling2020-11-112-1/+62
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | fix migration of oc_credentials tableRobin Appelman2020-11-121-23/+25
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix CSJoas Schilling2020-11-103-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Create primary keys on all tables and add a command to create the afterwardsJoas Schilling2020-11-104-6/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Replace the credentials table with one that can have empty userJoas Schilling2020-11-104-17/+176
| | | | | | 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-107-6/+71
| | | | 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>
* Remove @suppress SqlInjectionCheckerMorris Jobke2020-09-161-2/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix installing on OracleJoas Schilling2020-09-071-1/+3
| | | | | | | Empty strings are stored as null in Oracle, so a column with NotNull can not have an empty string as default Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-249-1/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Replace TYPE with TYPESDaniel Kesselberg2020-06-309-64/+64
| | | | | | 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>