diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-22 15:33:06 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-22 15:33:06 +0100 |
commit | 39aa7132ceed3d4beab3a9b828e571bbfc67c07e (patch) | |
tree | 6c88289c9f99be0af8635636fcdf64102090e5ec /config/database.yml | |
parent | 5ad8203ce4f1bfea997960d0b52c626dea24b944 (diff) | |
parent | 6f69c1a85055ec7c2515719d79d2a7a4e60cec50 (diff) |
Merge branch 'develop'5.1-beta1
Diffstat (limited to 'config/database.yml')
-rw-r--r-- | config/database.yml | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/config/database.yml b/config/database.yml index bd1748e..364cbdb 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,22 +1,44 @@ -development: - adapter: mysql2 +<% system_odbc_ini_file = '/var/lib/freeswitch/.odbc.ini' %> +<% if !File.exists?(system_odbc_ini_file) %> +development: + adapter: sqlite3 + database: db/development.sqlite3 + pool: 5 + timeout: 5000 + +production: + adapter: mysql2 encoding: utf8 database: gemeinschaft - pool: 5 + pool: 10 username: gemeinschaft password: gemeinschaft socket: /var/run/mysqld/mysqld.sock - reconnect: true + 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 + database: <%= system_odbc_configuration['gemeinschaft']['DATABASE'] %> + pool: 5 + username: <%= system_odbc_configuration['gemeinschaft']['USER'] %> + password: <%= system_odbc_configuration['gemeinschaft']['PASSWORD'] %> + socket: /var/run/mysqld/mysqld.sock + reconnect: true production: adapter: mysql2 encoding: utf8 - database: gemeinschaft + database: <%= system_odbc_configuration['gemeinschaft']['DATABASE'] %> pool: 10 - username: gemeinschaft - password: gemeinschaft + username: <%= system_odbc_configuration['gemeinschaft']['USER'] %> + password: <%= system_odbc_configuration['gemeinschaft']['PASSWORD'] %> socket: /var/run/mysqld/mysqld.sock reconnect: true +<% end %> +<% end %> # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". |