summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-12 10:28:49 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-12 10:28:49 +0100
commitd8287a7dbcc287791ed069cfc14ca6b9db0e66a7 (patch)
treecd8e2612c5e3ec488eb8f444e47b1a4d2ebbe963
parent0b9e91fd4654ac5c73072f9e77025abc3060c0c0 (diff)
Fixed a logic if/else bug.
-rw-r--r--config/database.yml42
-rw-r--r--db/schema.rb2
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"