diff options
author | spag <spag@golwen.net> | 2013-01-13 17:23:47 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-13 17:23:47 +0100 |
commit | 0b717b40b596fcd6ba238b2b3066b33a91289fdf (patch) | |
tree | 5b225d4085ac89532413ed224438d3ba187fda5f /config/database.yml | |
parent | 0d5114566e73c44799eac83d46f159cd979f4fcc (diff) | |
parent | 9567f239586f253002dea0ed654b7bd18a15e572 (diff) |
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'config/database.yml')
-rw-r--r-- | config/database.yml | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/config/database.yml b/config/database.yml index 2a7dcb5..364cbdb 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,17 +1,23 @@ <% system_odbc_ini_file = '/var/lib/freeswitch/.odbc.ini' %> -<% if File.exists?(system_odbc_ini_file) %> -<% system_odbc_configuration = IniFile.load(system_odbc_ini_file) %> -<% if !system_odbc_configuration['gemeinschaft']['DATABASE'].blank? && !system_odbc_configuration['gemeinschaft']['USER'].blank? %> +<% if !File.exists?(system_odbc_ini_file) %> +development: + adapter: sqlite3 + database: db/development.sqlite3 + pool: 5 + timeout: 5000 + production: - adapter: mysql2 + adapter: mysql2 encoding: utf8 - database: <%= system_odbc_configuration['gemeinschaft']['DATABASE'] %> + database: gemeinschaft pool: 10 - username: <%= system_odbc_configuration['gemeinschaft']['USER'] %> - password: <%= system_odbc_configuration['gemeinschaft']['PASSWORD'] %> + username: gemeinschaft + password: gemeinschaft socket: /var/run/mysqld/mysqld.sock reconnect: true - +<% else %> +<% system_odbc_configuration = IniFile.load(system_odbc_ini_file) %> +<% if !system_odbc_configuration['gemeinschaft']['DATABASE'].blank? && !system_odbc_configuration['gemeinschaft']['USER'].blank? %> development: adapter: mysql2 encoding: utf8 @@ -21,24 +27,14 @@ development: password: <%= system_odbc_configuration['gemeinschaft']['PASSWORD'] %> socket: /var/run/mysqld/mysqld.sock reconnect: true -<% else %> -production: - adapter: mysql2 - encoding: utf8 - database: gemeinschaft - pool: 10 - username: gemeinschaft - password: gemeinschaft - socket: /var/run/mysqld/mysqld.sock - reconnect: true -development: +production: adapter: mysql2 encoding: utf8 - database: gemeinschaft - pool: 5 - username: gemeinschaft - password: gemeinschaft + database: <%= system_odbc_configuration['gemeinschaft']['DATABASE'] %> + pool: 10 + username: <%= system_odbc_configuration['gemeinschaft']['USER'] %> + password: <%= system_odbc_configuration['gemeinschaft']['PASSWORD'] %> socket: /var/run/mysqld/mysqld.sock reconnect: true <% end %> |