Commit 05044658b398b10b9430579a2775878698b011bd

Authored by Dmitriy Zaporozhets
2 parents 98b484b9 04e9022e

Merge pull request #517 from gitlabhq/mysql_branch

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