aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/MigrationService.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: use proper migration sorting when checking if a migration needs to be ↵Robin Appelman2025-04-021-3/+3
| | | | | | executed Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(migration): Correctly sort migrations by version numberJoas Schilling2024-08-271-13/+21
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of ↵Joas Schilling2024-07-191-5/+4
| | | | | | removed upstream platforms Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat: add commands for exporting current and expected database schemaRobin Appelman2024-07-021-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-24/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #43357 from nextcloud/enh/41253/fix-occ-upgradeSimon L2024-02-081-10/+49
| | | fix(migration): Make naming constraint fail softer on updates
* Revert "Merge branch 'master' of github.com:nextcloud/server"Louis Chemineau2024-02-081-49/+10
| | | | | This reverts commit d9d60238c7aaab9c61bf2d50c15aa59bc88c8975, reversing changes made to ba3fdb0cdcfbb84f0080a2146a4ba2f01569915d.
* fix(migration): Make naming constraint fail softer on updatesJoas Schilling2024-02-071-10/+49
| | | | | | | | | | | | | | Only on installation we want to break hard, so that all developers notice the bugs when installing the app on any database or CI, and can work on fixing their migrations before releasing a version incompatible with Postgres. In case of updates we might be running on production instances and the administrators being faced with the error would not know how to resolve it anyway. This can also happen with instances, that had the issue before the current update, so we don't want to make their life more complicated than needed. Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(install): Make installing more verboseJoas Schilling2023-11-031-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Cleanup plsam issues in DB/ContactsManager and ConsoleCarl Schwan2023-09-051-38/+20
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* feat(db): Ensure that index names are unique across the databaseJoas Schilling2023-07-201-0/+55
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* typehint migrationservice closuresRoeland Jago Douma2022-10-091-4/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* composer run cs:fixCôme Chilliet2022-06-211-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix PHP 8.2 warnings about undeclared propertiesCôme Chilliet2022-06-211-21/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Log missing primary key until we make it a requirementJoas Schilling2022-04-081-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add missing doc changesJoas Schilling2022-04-071-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix typos and empty tabsJoas Schilling2022-04-071-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Improve error logging on migration failureJohn Molakvoæ2022-04-071-4/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Ensure schema change before checking OracleConstraintsJohn Molakvoæ2022-04-071-12/+23
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Merge pull request #31679 from ↵Côme Chilliet2022-03-311-0/+4
|\ | | | | | | | | nextcloud/bugfix/noid/ensure-string-columns-to-be-maximum-of-4000 Ensure string column limit of 4.000 characters
| * Ensure string column limit of 4.000 charactersJoas Schilling2022-03-251-0/+4
| | | | | | | | | | | | https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/datatype-limits.html#GUID-963C79C9-9303-49FE-8F2D-C8AAF04D3095 Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-241-1/+2
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Disable for now again until more apps are fixedJoas Schilling2022-03-211-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Limit missing primary key fail to new tablesJoas Schilling2022-03-211-1/+1
| | | | | | | This will work on CI so devs notice it when they install the app for testing, and at the same time existing faulty tables don't break the upgrade to 24 Signed-off-by: Joas Schilling <coding@schilljs.com>
* Enforce primary keys as they are required to be performant in MySQL clustersJoas Schilling2022-03-101-0/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Do not check Oracle column constraints in unrelated migrationsChristoph Wurst2021-04-191-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Rename the method to match what it doesJoas Schilling2021-03-311-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Don't allow Notnull for boolean columnsJoas Schilling2021-03-311-0/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Document the constraints we test againstJoas Schilling2021-03-311-0/+17
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix exception messages spacingJoas Schilling2021-03-311-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only mark migrations as installed after executionJoas Schilling2021-03-041-2/+4
| | | | | | | The problem is that if a developer creates a structural error in their migration file, they will already be marked as executed and an not be rerun. Signed-off-by: Joas Schilling <coding@schilljs.com>
* When it kicks inJoas Schilling2021-02-181-7/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-081-5/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make sure the migrations table schema is always checkedJulius Härtl2020-12-091-1/+1
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net> Revert "Make sure the migrations table schema is always checked" This reverts commit 258955ef738a52d9da2ac2fe59466e6093d7e9bc. Set current vendor during upgrade and perform migrations table change if needed Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Make debugging migration exceptions easierJoas Schilling2020-12-071-1/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Revert "Revert "Installation goes brrrr""Joas Schilling2020-11-111-0/+46
|
* Revert "Installation goes brrrr"Christoph Wurst2020-11-111-46/+0
|
* Don't create a schema to check if the migrations table existsJoas Schilling2020-11-111-0/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Reduce the number of schemas we generate when we just run all migrations anywayJoas Schilling2020-11-111-0/+41
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Warn about adding NotNull columns with nullable defaultJoas Schilling2020-09-071-0/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Replace TYPE with TYPESDaniel Kesselberg2020-06-301-3/+3
| | | | | | As TYPE::* is deprecated. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* 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-2/+1
| | | | | | | | | | | | | | | 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>