summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup
Commit message (Collapse)AuthorAgeFilesLines
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-8/+7
| | | | | | | | | | | | | | | 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 elseif instead of else ifChristoph Wurst2020-04-102-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-313-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-263-13/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Check the new connection on setup like with PostgreSQL and OracleJoas Schilling2020-02-051-0/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only provide the auth method for MySQL 8.0+ to not break MariaDBJoas Schilling2020-02-051-4/+13
| | | | | | Provide the auth method for MySQL 8.0+ Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2019-12-055-6/+9
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-223-0/+3
| | | | | | | | | | | * 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 installing with MySQL 8.0.4+Joas Schilling2019-11-201-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #15187 from vitormattos/bugfix-create-database-userRoeland Jago Douma2019-08-081-0/+4
|\ | | | | Bugfix: user is not allowed
| * solve code reviewVitor Mattos2019-04-221-1/+1
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
| * Check if database exists and grand permissionVitor Mattos2019-04-211-2/+4
| | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
| * Bugfix: user is not allowedVitor Mattos2019-04-211-0/+2
| | | | | | | | | | | | The created user don't has permission to connect to database. I changed the code to give permission Signed-off-by: Vitor Mattos <vitor@php.rio>
* | Use specific privileges when creating adminOliver Salzburg2019-07-161-1/+1
|/ | | | | | | | | | | Using the ALL shorthand can cause problems when not all privileges are available to the user. For example, AWS RDS MariaDB/MySQL will not grant the initial user account on an instance the SUPER privilege. While the user account is still valid for pretty much any task on the DB instance, it can not use the ALL shorthand when granting privileges to new users. By supplying a specific set of privileges, we work around this limitation without sacrificing functionality. Closes #16139 Signed-off-by: Oliver Salzburg <oliver.salzburg@gmail.com>
* Cleanup some PHPDoc leftovers and unused variablesMorris Jobke2019-03-061-6/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use empty instead ?? because dbname is '' sometimesDaniel Kesselberg2018-09-231-2/+7
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Use const for dbname and dbtableprefix defaultsDaniel Kesselberg2018-09-231-6/+33
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* --database-name or --database-table-prefix are ignored for sqliteDaniel Kesselberg2018-09-231-4/+2
| | | | | | | | | | The default implementation of initialize in AbstractDatabase writes database information to config.php. The method is overwritten in Sqlite but parent is never called. Database-Name and Database-Table-Prefix are never written to config.php. But from this point setup use values from config. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* move log constants to ILoggerArthur Schiwon2018-04-261-4/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-262-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-231-10/+14
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-064-6/+8
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* cleanup oci setup codeRobin Appelman2017-09-061-173/+22
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Install from migrationsJoas Schilling2017-07-255-23/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add Phan plugin to check for SQL injectionsLukas Reschke2017-07-201-0/+5
| | | | | | | | | | 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>
* Start migrationsJoas Schilling2017-07-051-0/+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>
* fix install on mb4 enabled mariadb/mysqlArthur Schiwon2017-06-011-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* MySQL 4 byte is now detected during setup in any case.Thomas Müller2017-04-281-6/+4
| | | | config.sample.php was updated to explicitly state that there detection in place to set mysql.utf8mb4
* Add console command to migrate the charsetThomas Müller2017-04-281-23/+7
|
* During setup of a mysql database we try to detect if charset 'utf8mb4' can ↵Thomas Müller2017-04-281-0/+26
| | | | be used
* Remove unused use statementsMorris Jobke2017-04-221-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix translationsJoas Schilling2017-04-182-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* use the same oci connectstring in all code pathsRobin Appelman2017-04-101-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use SystemConfig instead of AllConfig for DB stuffMorris Jobke2017-03-195-18/+17
| | | | | | * 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-191-1/+0
| | | | | | * minor fixes in preparation of a bigger DB and config PR Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add proper default value for datadirMorris Jobke2017-01-191-1/+1
| | | | | | | * better safe than sorry * fixes #3091 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #2535 from ↵Joas Schilling2017-01-051-7/+9
|\ | | | | | | | | nextcloud/allow-to-reuse-admin-as-install-name-like-on-mysql Allow to reuse the same name when installing a new instance on postgres
| * Allow to reuse the same name when installing a new instanceJoas Schilling2016-12-121-7/+9
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #2670 from ↵Roeland Jago Douma2016-12-141-1/+1
|\ \ | | | | | | | | | | | | nextcloud/issue-2646-dont-connet-to-database-before-creating-it Do not connect to database before creating it
| * | Do not connect to database before creating itJoas Schilling2016-12-141-1/+1
| |/ | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* / Only log as info when we can not create a new DB userJoas Schilling2016-12-141-1/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Lower the role name before using itJoas Schilling2016-12-091-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Revert "Quote database and role in queries"Joas Schilling2016-12-091-4/+4
| | | | This reverts commit 9ebd5d5bb20af9178e071c3c6f3b41d9a9bc8be0.
* Quote database and role in queriesLari Tikkanen2016-12-071-4/+4
| | | | | Fixes #1793 Signed-off-by: Lari Tikkanen <lartza@outlook.com>
* handle postgres setup when we cant connect as adminRobin Appelman2016-12-052-39/+50
|
* Added Exception catch in case of DB User existsHemanth Kumar Veeranki2016-10-311-8/+16
| | | | Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
* Move away from OC_L10NRoeland Jago Douma2016-10-281-2/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fixing ctor callThomas Müller2016-10-191-1/+1
|
* Add config option to update charset of mysql to utf8mb4Morris Jobke2016-10-191-2/+3
| | | | | * fully optional * requires additional options set in the database
* Use proper ALTER ROLE syntaxRoeland Jago Douma2016-09-051-1/+1
| | | | | | Fixes #1260 See https://www.postgresql.org/docs/9.0/static/sql-alterrole.html