diff options
Diffstat (limited to 'config')
-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 %> |