summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix misleading MySQL DB creation error (#25485)Vincent Petry2016-07-271-1/+9
| | | | | | | Whenever the GRANT ALL failed, it used to display "Database creation failed" which is incorrect. It's only the privleges setting that failed. This moves the privilege setting message to DEBUG and makes it more precise.
* revert to old setup connection logicRobin Appelman2016-07-261-10/+26
|
* Update with robinJoas Schilling2016-07-212-2/+2
|
* Fix othersJoas Schilling2016-07-215-13/+21
|
* Prevent syntax error when creating user or changing passwordJoas Schilling2016-07-181-3/+3
|
* use pdo for postgres setupRobin Appelman2016-07-122-105/+85
|
* Remove duplicate database connect logic in mysql setupRobin Appelman2016-07-122-36/+21
|
* Changed the input option for database-port to required when parameter was ↵Thomas Pulzer2016-07-062-4/+4
| | | | | | provided. Added casting database port to int for input sanitation in pgsql and oci connections.
* Added occ install option for database-port.Thomas Pulzer2016-07-064-7/+23
| | | | | Extended the database setup to store the database port. Changed the PostgreSQL connection error message for clarification.