From 4afa032b4c580f71419880ebc56d1f9f2a005365 Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Tue, 29 Mar 2016 18:45:23 +0000 Subject: [PATCH] Make port number configurable. --- script/import_scripts/phpbb3/database/database.rb | 1 + script/import_scripts/phpbb3/settings.yml | 1 + script/import_scripts/phpbb3/support/settings.rb | 2 ++ 3 files changed, 4 insertions(+) diff --git a/script/import_scripts/phpbb3/database/database.rb b/script/import_scripts/phpbb3/database/database.rb index 731f05b8a12..b63d0356331 100644 --- a/script/import_scripts/phpbb3/database/database.rb +++ b/script/import_scripts/phpbb3/database/database.rb @@ -34,6 +34,7 @@ module ImportScripts::PhpBB3 def create_database_client Mysql2::Client.new( host: @database_settings.host, + port: @database_settings.port, username: @database_settings.username, password: @database_settings.password, database: @database_settings.schema diff --git a/script/import_scripts/phpbb3/settings.yml b/script/import_scripts/phpbb3/settings.yml index 279900feeff..4e7cb9bcb4a 100644 --- a/script/import_scripts/phpbb3/settings.yml +++ b/script/import_scripts/phpbb3/settings.yml @@ -3,6 +3,7 @@ database: type: MySQL # currently only MySQL is supported - more to come soon host: localhost + port: 3306 username: root password: schema: phpbb diff --git a/script/import_scripts/phpbb3/support/settings.rb b/script/import_scripts/phpbb3/support/settings.rb index 1c68c5f8b7a..e2182a0bc7e 100644 --- a/script/import_scripts/phpbb3/support/settings.rb +++ b/script/import_scripts/phpbb3/support/settings.rb @@ -61,6 +61,7 @@ module ImportScripts::PhpBB3 class DatabaseSettings attr_reader :type attr_reader :host + attr_reader :port attr_reader :username attr_reader :password attr_reader :schema @@ -70,6 +71,7 @@ module ImportScripts::PhpBB3 def initialize(yaml) @type = yaml['type'] @host = yaml['host'] + @port = yaml['port'] @username = yaml['username'] @password = yaml['password'] @schema = yaml['schema']