aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/Migrator.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Run migration sql as statement so that the primary db node is usedJulius Härtl2024-08-301-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-24/+4
| | | | 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>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-3/+3
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(DB): Update comment to state why we still use the max 4k limitJoas Schilling2023-10-061-1/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(dbal): Move migrator away from deprecated callsJoas Schilling2023-10-061-11/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* refactor: Use DBAL's executeQuery instead of query (deprecated)Christoph Wurst2023-09-271-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm issues following doctrine/dbal bumpCôme Chilliet2022-11-211-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate Migrator::executeSql to OCP\EventDispatcher\EventCôme Chilliet2022-08-251-7/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Switch to string keys for argument of GenericEvent for OC\DB\MigratorCôme Chilliet2022-08-251-21/+10
| | | | | | It seems checkTable is actually never dispatched? Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-5/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Skip db migration simulation for core schema changesJulius Härtl2021-03-171-103/+0
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Filter tables with other table prefixDaniel Kesselberg2021-03-021-4/+4
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Add our own DB exception abstractionChristoph Wurst2021-01-121-0/+7
| | | | | | | | | | | | | | | | | | Right now our API exports the Doctrine/dbal exception. As we've seen with the dbal 3 upgrade, the leakage of 3rdparty types is problematic as a dependency update means lots of work in apps, due to the direct dependency of what Nextcloud ships. This breaks this dependency so that apps only need to depend on our public API. That API can then be vendor (db lib) agnostic and we can work around future deprecations/removals in dbal more easily. Right now the type of exception thrown is transported as "reason". For the more popular types of errors we can extend the new exception class and allow apps to catch specific errors only. Right now they have to catch-check-rethrow. This is not ideal, but better than the dependnecy on dbal. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't try a transaction for the migrator on MySQLJoas Schilling2021-01-081-2/+7
| | | | | | | | | | | | | As per https://dev.mysql.com/doc/refman/8.0/en/implicit-commit.html CREATE TABLE statements automatically commit always. The only reason this worked in the past was that PHPs PDO connection didn't check the actual state on commit, but only checked their internal state. But in PHP8 this was fixed: https://github.com/php/php-src/blob/PHP-8.0/UPGRADING#L446-L450 So now commit() fails because the internal PDO connection implicitly commited already. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-081-36/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix "misplaced variables" warning of Psalm in PHPDoc statementsMorris Jobke2020-08-171-1/+0
| | | | | | Ref #21787 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-2/+2
| | | | | | | | | | | | | | | 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>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix mismatching doc block parameter typesChristoph Wurst2020-03-061-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-6/+6
| | | | | | | | | | | * 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>
* Add event dispatcher to OCPChristoph Wurst2019-06-251-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Start migrationsJoas Schilling2017-07-051-8/+9
| | | | | | | | | | Fixme: - Install and update of apps - No revert on live systems (debug only) - Service adjustment to our interface - Loading via autoloader Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update with robinJoas Schilling2016-07-211-1/+1
|
* Fix othersJoas Schilling2016-07-211-1/+2
|
* Various database migration fixes (#25209)Thomas Müller2016-06-291-0/+20
| | | | | | | | | | | | | * String columns with a length higher then 4000 are converted into a CLOB columns automagically - we have to respect this when migrating * Adding schema migration tests to prevent unnecessary and non-sense migration steps Fix Oracle autoincrement and unsigned handling * Fix sqlite integer type for autoincrement * Use lower case table names - fixes pg * Fix postgres with default -1 - this only affect pg 9.4 servers - 9.5 seems to work fine
* Move \OC\DB to PSR-4Roeland Jago Douma2016-04-151-0/+292
Besides the statement wrapper that is moved to the legacy folder (namepsace of shame folder)