diff options
-rw-r--r-- | config/database.yml | 42 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 20 insertions, 24 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 %> diff --git a/db/schema.rb b/db/schema.rb index bc7693b..cc5afcc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130111111747) do +ActiveRecord::Schema.define(:version => 20130112074800) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" |