Commit 05044658b398b10b9430579a2775878698b011bd
Exists in
master
and in
4 other branches
Merge pull request #517 from gitlabhq/mysql_branch
Gitlab moved to mysql
Showing
4 changed files
with
57 additions
and
14 deletions
Show diff stats
Gemfile
... | ... | @@ -3,6 +3,7 @@ source "http://rubygems.org" |
3 | 3 | gem "rails", "3.2.1" |
4 | 4 | |
5 | 5 | gem "sqlite3" |
6 | +gem "mysql2" | |
6 | 7 | gem "rake" |
7 | 8 | gem "devise" |
8 | 9 | gem "stamp" |
... | ... | @@ -31,6 +32,7 @@ gem "foreman" |
31 | 32 | gem "omniauth-ldap" |
32 | 33 | gem 'bootstrap-sass', "1.4.4" |
33 | 34 | gem "colored" |
35 | +gem 'yaml_db', :git => "https://github.com/gitlabhq/yaml_db.git" | |
34 | 36 | |
35 | 37 | group :assets do |
36 | 38 | gem "sass-rails", "3.2.3" | ... | ... |
Gemfile.lock
... | ... | @@ -21,6 +21,12 @@ GIT |
21 | 21 | mime-types (~> 1.15) |
22 | 22 | posix-spawn (~> 0.3.6) |
23 | 23 | |
24 | +GIT | |
25 | + remote: https://github.com/gitlabhq/yaml_db.git | |
26 | + revision: 98e9a5dca43e3fedd3268c76a73af40d1bdf1dfd | |
27 | + specs: | |
28 | + yaml_db (0.2.2) | |
29 | + | |
24 | 30 | GEM |
25 | 31 | remote: http://rubygems.org/ |
26 | 32 | specs: |
... | ... | @@ -144,6 +150,7 @@ GEM |
144 | 150 | mime-types (1.17.2) |
145 | 151 | multi_json (1.0.4) |
146 | 152 | multi_xml (0.4.1) |
153 | + mysql2 (0.3.11) | |
147 | 154 | net-ldap (0.2.2) |
148 | 155 | nokogiri (1.5.0) |
149 | 156 | omniauth (1.0.2) |
... | ... | @@ -313,6 +320,7 @@ DEPENDENCIES |
313 | 320 | kaminari |
314 | 321 | launchy |
315 | 322 | letter_opener |
323 | + mysql2 | |
316 | 324 | omniauth-ldap |
317 | 325 | pry |
318 | 326 | pygments.rb (= 0.2.4) |
... | ... | @@ -334,3 +342,4 @@ DEPENDENCIES |
334 | 342 | turn |
335 | 343 | uglifier (= 1.0.3) |
336 | 344 | webmock |
345 | + yaml_db! | ... | ... |
config/database.yml.example
1 | -# SQLite version 3.x | |
2 | -# gem install sqlite3 | |
3 | -# | |
4 | -# Ensure the SQLite 3 gem is defined in your Gemfile | |
5 | -# gem 'sqlite3' | |
6 | 1 | development: |
7 | - adapter: sqlite3 | |
8 | - database: db/development.sqlite3 | |
2 | + adapter: mysql2 | |
3 | + encoding: utf8 | |
4 | + reconnect: false | |
5 | + database: gitlabhq_development | |
9 | 6 | pool: 5 |
10 | - timeout: 5000 | |
7 | + username: root | |
8 | + password: "secure password" | |
9 | + # socket: /tmp/mysql.sock | |
11 | 10 | |
12 | 11 | # Warning: The database defined as "test" will be erased and |
13 | 12 | # re-generated from your development database when you run "rake". |
14 | 13 | # Do not set this db to the same as development or production. |
15 | 14 | test: |
16 | - adapter: sqlite3 | |
17 | - database: db/test.sqlite3 | |
15 | + adapter: mysql2 | |
16 | + encoding: utf8 | |
17 | + reconnect: false | |
18 | + database: gitlabhq_test | |
18 | 19 | pool: 5 |
19 | - timeout: 5000 | |
20 | + username: root | |
21 | + password: "secure password" | |
22 | + # socket: /tmp/mysql.sock | |
20 | 23 | |
21 | 24 | production: |
22 | - adapter: sqlite3 | |
23 | - database: db/production.sqlite3 | |
25 | + adapter: mysql2 | |
26 | + encoding: utf8 | |
27 | + reconnect: false | |
28 | + database: gitlabhq_production | |
24 | 29 | pool: 5 |
25 | - timeout: 5000 | |
30 | + username: root | |
31 | + password: "secure password" | |
32 | + # socket: /tmp/mysql.sock | ... | ... |
... | ... | @@ -0,0 +1,25 @@ |
1 | +# SQLite version 3.x | |
2 | +# gem install sqlite3 | |
3 | +# | |
4 | +# Ensure the SQLite 3 gem is defined in your Gemfile | |
5 | +# gem 'sqlite3' | |
6 | +development: | |
7 | + adapter: sqlite3 | |
8 | + database: db/development.sqlite3 | |
9 | + pool: 5 | |
10 | + timeout: 5000 | |
11 | + | |
12 | +# Warning: The database defined as "test" will be erased and | |
13 | +# re-generated from your development database when you run "rake". | |
14 | +# Do not set this db to the same as development or production. | |
15 | +test: | |
16 | + adapter: sqlite3 | |
17 | + database: db/test.sqlite3 | |
18 | + pool: 5 | |
19 | + timeout: 5000 | |
20 | + | |
21 | +production: | |
22 | + adapter: sqlite3 | |
23 | + database: db/production.sqlite3 | |
24 | + pool: 5 | |
25 | + timeout: 5000 | ... | ... |