summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock9
-rw-r--r--config/database.yml.example35
-rw-r--r--config/database.yml.sqlite25
4 files changed, 57 insertions, 14 deletions
diff --git a/Gemfile b/Gemfile
index 8a85c3fa762..867bfa7a40f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,6 +3,7 @@ source "http://rubygems.org"
gem "rails", "3.2.1"
gem "sqlite3"
+gem "mysql2"
gem "rake"
gem "devise"
gem "stamp"
@@ -31,6 +32,7 @@ gem "foreman"
gem "omniauth-ldap"
gem 'bootstrap-sass', "1.4.4"
gem "colored"
+gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git"
group :assets do
gem "sass-rails", "3.2.3"
diff --git a/Gemfile.lock b/Gemfile.lock
index cee6ed7e01d..cb1a14b9a24 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -21,6 +21,12 @@ GIT
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
+GIT
+ remote: https://github.com/gitlabhq/yaml_db.git
+ revision: 98e9a5dca43e3fedd3268c76a73af40d1bdf1dfd
+ specs:
+ yaml_db (0.2.2)
+
GEM
remote: http://rubygems.org/
specs:
@@ -144,6 +150,7 @@ GEM
mime-types (1.17.2)
multi_json (1.0.4)
multi_xml (0.4.1)
+ mysql2 (0.3.11)
net-ldap (0.2.2)
nokogiri (1.5.0)
omniauth (1.0.2)
@@ -313,6 +320,7 @@ DEPENDENCIES
kaminari
launchy
letter_opener
+ mysql2
omniauth-ldap
pry
pygments.rb (= 0.2.4)
@@ -334,3 +342,4 @@ DEPENDENCIES
turn
uglifier (= 1.0.3)
webmock
+ yaml_db!
diff --git a/config/database.yml.example b/config/database.yml.example
index 51a4dd459dc..379469f79c5 100644
--- a/config/database.yml.example
+++ b/config/database.yml.example
@@ -1,25 +1,32 @@
-# SQLite version 3.x
-# gem install sqlite3
-#
-# Ensure the SQLite 3 gem is defined in your Gemfile
-# gem 'sqlite3'
development:
- adapter: sqlite3
- database: db/development.sqlite3
+ adapter: mysql2
+ encoding: utf8
+ reconnect: false
+ database: gitlabhq_development
pool: 5
- timeout: 5000
+ username: root
+ password: "secure password"
+ # socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- adapter: sqlite3
- database: db/test.sqlite3
+ adapter: mysql2
+ encoding: utf8
+ reconnect: false
+ database: gitlabhq_test
pool: 5
- timeout: 5000
+ username: root
+ password: "secure password"
+ # socket: /tmp/mysql.sock
production:
- adapter: sqlite3
- database: db/production.sqlite3
+ adapter: mysql2
+ encoding: utf8
+ reconnect: false
+ database: gitlabhq_production
pool: 5
- timeout: 5000
+ username: root
+ password: "secure password"
+ # socket: /tmp/mysql.sock
diff --git a/config/database.yml.sqlite b/config/database.yml.sqlite
new file mode 100644
index 00000000000..51a4dd459dc
--- /dev/null
+++ b/config/database.yml.sqlite
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+# gem install sqlite3
+#
+# Ensure the SQLite 3 gem is defined in your Gemfile
+# gem 'sqlite3'
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+production:
+ adapter: sqlite3
+ database: db/production.sqlite3
+ pool: 5
+ timeout: 5000