Skip to content

Conversation

@Faldon
Copy link
Contributor

@Faldon Faldon commented Jul 6, 2016

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

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

->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
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.

@nickvergessen nickvergessen added enhancement 3. to review Waiting for reviews labels Jul 6, 2016
@nickvergessen nickvergessen added this to the Nextcloud Next milestone Jul 6, 2016
@Faldon
Copy link
Contributor Author

Faldon commented Jul 6, 2016

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
Member

👍

@MorrisJobke
Copy link
Member

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 5d2d681 into nextcloud:master Jul 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants