summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
Commit message (Collapse)AuthorAgeFilesLines
* Create the migrations table also with the UTF8mb4 collationJoas Schilling2018-01-311-12/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Correctly drop the ownCloud migrations tableJoas Schilling2018-01-181-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix the type hints of migrations and correctly inject the wrapped schema ↵Joas Schilling2018-01-172-21/+16
| | | | | | into migrations Signed-off-by: Joas Schilling <coding@schilljs.com>
* Drop the ownCloud migration table instead of reusing itJoas Schilling2018-01-041-3/+36
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* add postgresql10 compatibility to dbalRobin Appelman2017-11-222-98/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersMorris Jobke2017-11-0618-8/+33
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Die NoCheckMigratorVictor Dubiniuk2017-10-303-41/+2
|
* Add foreign key support to OCPiotr Mrowczynski2017-10-301-4/+36
|
* quote index columns on oracle, handle all index changes, minor phpdoc cleanupJörn Friedrich Dreyer2017-10-301-27/+85
|
* Fix bigint handling on postgresJoas Schilling2017-09-292-0/+98
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a method to compare empty strings with an expressionJoas Schilling2017-08-022-0/+45
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix ILIKE regex for oracleJoas Schilling2017-08-021-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Quote aliases as wellJoas Schilling2017-08-022-10/+24
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Function also accepts intsLukas Reschke2017-08-011-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add brackets around concat statements so comparing the result works as intendedJoas Schilling2017-07-282-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* "Only variables must be passed by reference"Joas Schilling2017-07-251-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use order by to avoid problems when chunking finds a same item again...Joas Schilling2017-07-251-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add Phan plugin to check for SQL injectionsLukas Reschke2017-07-201-0/+1
| | | | | | | | | | This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues. As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections. The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Only create the migration directory when necessaryJoas Schilling2017-07-061-9/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add migration for personal settings stuffJoas Schilling2017-07-051-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix the installer testsJoas Schilling2017-07-051-1/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix tests of CodeChecker and MigrationServiceJoas Schilling2017-07-051-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix dropping tables and handle the prefix automaticallyJoas Schilling2017-07-052-3/+143
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to check the schema in pre and post as wellJoas Schilling2017-07-051-3/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a version to migrations, so parallel legacy branches can also have ↵Joas Schilling2017-07-051-0/+8
| | | | | | migrations Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add author and copyrightJoas Schilling2017-07-051-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix code issuesJoas Schilling2017-07-051-11/+16
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use autoloading instead of require_once from a different dirJoas Schilling2017-07-051-12/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adjust the code to use our interface and abstractJoas Schilling2017-07-051-13/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Start migrationsJoas Schilling2017-07-055-14/+507
| | | | | | | | | | 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>
* Add console command to migrate the charsetThomas Müller2017-04-281-0/+49
|
* Adjust query/event logging code in favour of more complex ↵Piotr Mrówczyński2017-04-261-3/+0
| | | | | | | owncloud/diagnostics (#27643) * Adjust query/event logging code in favour of more complex owncloud/diagnostics * Add descriptions to IQueryLogger and IEventLogger interfaces
* Remove unused use statementsMorris Jobke2017-04-222-8/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #4282 from nextcloud/oci-connect-stringMorris Jobke2017-04-121-23/+35
|\ | | | | use the same oci connectstring in all code paths
| * use the same oci connectstring in all code pathsRobin Appelman2017-04-101-23/+35
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #4331 from nextcloud/query-builder-sumMorris Jobke2017-04-121-0/+4
|\ \ | | | | | | Add sum() to the query function builder
| * | Add sub() to the query function builderRobin Appelman2017-04-121-0/+4
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #4146 from nextcloud/unread-comments-folderMorris Jobke2017-04-101-1/+1
|\ \ | |/ |/| Allow getting the unread comment count for an entire folder at once
| * Allow getting the unread comment count for an entire folder at onceRobin Appelman2017-03-301-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | rename fun to funcRobin Appelman2017-03-301-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | dont double escapeRobin Appelman2017-03-302-2/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix licence headersRobin Appelman2017-03-305-40/+45
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Add function builder to the query builderRobin Appelman2017-03-305-0/+172
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | add support for escaping like parameters when using the query builderRobin Appelman2017-03-303-0/+50
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Add MD5() to sqliteRobin Appelman2017-03-301-0/+3
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Address commentsMorris Jobke2017-03-212-21/+1
| | | | | | | | | * fix URL to documentation * improve logic of UTF8mb4 check * fix connection parameter creation - it's done already in ConnectionFactory::createConnectionParams * remove unused attributes of MDB2SchemaReader Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Adding tests for 4 byte unicode charactersMorris Jobke2017-03-214-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * success on SQLite and Postgres * failure on MySQL due to the limited charset that only supports up to 3 bytes Add config option to update charset of mysql to utf8mb4 * fully optional * requires additional options set in the database only disable unicode test on mysql Fixing ctor call Adding docker based unit test execution for mysql utf8mb4 Add mysqlmb4 test configuration to Jenkinsfile fix collation on utf8mb4 Properly setup charset and collation in the doctrine connection Allow files containing 4-byte chars in case the database supports it During setup of a mysql database we try to detect if charset 'utf8mb4' can be used Fix mysql settings Add console command to migrate the charset Set ROW_FORMAT before setting collation to mb4 Also select tables with wrong collation Faster MySQL docker Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use SystemConfig instead of AllConfig for DB stuffMorris Jobke2017-03-191-14/+22
| | | | | | * preparation for followup PRs to clean up the DB bootstrapping Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Namespace and array syntax fixesMorris Jobke2017-03-192-25/+27
| | | | | | * minor fixes in preparation of a bigger DB and config PR Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fixed failing test which was ignoring a required (not null) column (#26303)Philipp Schaffrath2017-03-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | * Fixed failing test which was ignoring a required (not null) column * restored test to original, catching DriverException which also catches ConstraintViolationException * catch ConstraintViolationException again * removed unnecessary field from this test * clobfield should be nullable * clobfield now is nullable * removed autoincrement since whenever this strategy is enabled, oracle would not throw constraint violation exceptions (needed for setValues), which mysql still does * this field does not auto increment anymore * mark integerfield as primary, since it is not getting marked as such through auto increment anymore, integerfield default always has been 0 instead of null Signed-off-by: Morris Jobke <hey@morrisjobke.de>