Skip to content

Added occ install option for database-port - #323

Merged
MorrisJobke merged 2 commits into
nextcloud:masterfrom
Faldon:database_port
Jul 7, 2016
Merged

Added occ install option for database-port#323
MorrisJobke merged 2 commits into
nextcloud:masterfrom
Faldon:database_port

Conversation

@Faldon

@FaldonFaldon commented Jul 6, 2016

Copy link
Copy Markdown
Contributor

Implemented non-standard database port on occ install

  • Added optional input option --database-port in maintenance:install command
  • Refactored the databases to store the database port as string, defaulting to an empty string
  • Kept parsing hostname for port option in psql and mysql when no port was provided
  • Changed the PostgreSQL connection error message

Tested

  • with MySQL TCP port
  • with MySQL Unix Socket
  • with PostgreSQL

ToDo

  • Testing with Oracle

Solves #271

Extended the database setup to store the database port.
Changed the PostgreSQL connection error message for clarification.
@mention-bot

Copy link
Copy Markdown

@Faldon, thanks for your PR! By analyzing the annotation information on this pull request, we identified @bartv2, @DeepDiver1975 and @nickvergessen to be potential reviewers

Comment threadcore/Command/Maintenance/Install.php Outdated
->addOption('database', null, InputOption::VALUE_REQUIRED, 'Supported database type', 'sqlite')
->addOption('database-name', null, InputOption::VALUE_REQUIRED, 'Name of the database')
->addOption('database-host', null, InputOption::VALUE_REQUIRED, 'Hostname of the database', 'localhost')
->addOption('database-port', null, InputOption::VALUE_OPTIONAL, 'Port the database is listening on')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be InputOption::VALUE_REQUIRED

Options are all optional, but when you specify it, it needs a value.

@nickvergessennickvergessen added this to the Nextcloud Next milestone Jul 6, 2016
@Faldon

Copy link
Copy Markdown
ContributorAuthor

Ofc, casting to int is much more appropriate. And in case the port was provided with the hostname, addslashes is already executed on the string.

… was provided.
Added casting database port to int for input sanitation in pgsql and oci connections.
@nickvergessen

Copy link
Copy Markdown
Member

👍

@MorrisJobke

Copy link
Copy Markdown
Member

Tested and works 👍

@MorrisJobke
MorrisJobke merged commit 5d2d681 into nextcloud:masterJul 7, 2016
@Faldon
Faldon deleted the database_port branch July 7, 2016 08:21
R0Wi pushed a commit to R0Wi/server that referenced this pull request Nov 22, 2025
The system flag and extra table for that `ex_app_users` is removed to
optimize database usage and simplify the system logic.
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Faldon@mention-bot@nickvergessen@MorrisJobke