mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
Make port number configurable.
This commit is contained in:
@ -34,6 +34,7 @@ module ImportScripts::PhpBB3
|
|||||||
def create_database_client
|
def create_database_client
|
||||||
Mysql2::Client.new(
|
Mysql2::Client.new(
|
||||||
host: @database_settings.host,
|
host: @database_settings.host,
|
||||||
|
port: @database_settings.port,
|
||||||
username: @database_settings.username,
|
username: @database_settings.username,
|
||||||
password: @database_settings.password,
|
password: @database_settings.password,
|
||||||
database: @database_settings.schema
|
database: @database_settings.schema
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
database:
|
database:
|
||||||
type: MySQL # currently only MySQL is supported - more to come soon
|
type: MySQL # currently only MySQL is supported - more to come soon
|
||||||
host: localhost
|
host: localhost
|
||||||
|
port: 3306
|
||||||
username: root
|
username: root
|
||||||
password:
|
password:
|
||||||
schema: phpbb
|
schema: phpbb
|
||||||
|
@ -61,6 +61,7 @@ module ImportScripts::PhpBB3
|
|||||||
class DatabaseSettings
|
class DatabaseSettings
|
||||||
attr_reader :type
|
attr_reader :type
|
||||||
attr_reader :host
|
attr_reader :host
|
||||||
|
attr_reader :port
|
||||||
attr_reader :username
|
attr_reader :username
|
||||||
attr_reader :password
|
attr_reader :password
|
||||||
attr_reader :schema
|
attr_reader :schema
|
||||||
@ -70,6 +71,7 @@ module ImportScripts::PhpBB3
|
|||||||
def initialize(yaml)
|
def initialize(yaml)
|
||||||
@type = yaml['type']
|
@type = yaml['type']
|
||||||
@host = yaml['host']
|
@host = yaml['host']
|
||||||
|
@port = yaml['port']
|
||||||
@username = yaml['username']
|
@username = yaml['username']
|
||||||
@password = yaml['password']
|
@password = yaml['password']
|
||||||
@schema = yaml['schema']
|
@schema = yaml['schema']
|
||||||
|
Reference in New Issue
Block a user