Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Postgres support #75

Merged
merged 1 commit into from

2 participants

@razielgn

Had to remove a mysql-dependent piece in db/schema.rb.
It's not the best thing, but since it doesn't show up in migrations I don't really know any other way to fix it.

Thanks for the effort on the gitlab suite.

Specs are passing, by the way: https://travis-ci.org/razielgn/gitlab-ci

@randx randx merged commit 23c543a into gitlabhq:master
@randx
Owner

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 20, 2013
  1. @razielgn

    Added postgresql support.

    razielgn authored
This page is out of date. Refresh to see the latest.
View
2  .travis.yml
@@ -1,5 +1,6 @@
env:
- DB=mysql
+ - DB=postgresql
branches:
only:
- 'master'
@@ -7,6 +8,7 @@ rvm:
- 1.9.3
services:
- mysql
+ - postgresql
before_script:
- "cp config/database.yml.$DB config/database.yml"
- "bundle exec rake db:create"
View
3  Gemfile
@@ -11,7 +11,8 @@ end
gem 'rails', '3.2.8'
# DB
-gem 'mysql2'
+gem 'mysql2', group: :mysql
+gem 'pg', group: :postgres
# Settings
gem 'settingslogic'
View
2  Gemfile.lock
@@ -116,6 +116,7 @@ GEM
mysql2 (0.3.11)
nokogiri (1.5.5)
orm_adapter (0.4.0)
+ pg (0.14.1)
polyglot (0.3.3)
posix-spawn (0.3.6)
pry (0.9.10)
@@ -255,6 +256,7 @@ DEPENDENCIES
haml-rails
jquery-rails
mysql2
+ pg
pry
quiet_assets
rails (= 3.2.8)
View
37 config/database.yml.postgresql
@@ -0,0 +1,37 @@
+#
+# PRODUCTION
+#
+production:
+ adapter: postgresql
+ encoding: unicode
+ database: gitlab_ci_production
+ pool: 5
+ username: postgres
+ password:
+ # host: localhost
+ # port: 5432
+ # socket: /tmp/postgresql.sock
+
+#
+# Development specific
+#
+development:
+ adapter: postgresql
+ encoding: unicode
+ database: gitlab_ci_development
+ pool: 5
+ username: postgres
+ password:
+ # socket: /tmp/postgresql.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: &test
+ adapter: postgresql
+ encoding: unicode
+ database: gitlab_ci_test
+ pool: 5
+ username: postgres
+ password:
+ # socket: /tmp/postgresql.sock
View
2  db/schema.rb
@@ -18,7 +18,7 @@
t.string "ref"
t.string "status"
t.datetime "finished_at"
- t.text "trace", :limit => 2147483647
+ t.text "trace"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "sha"
Something went wrong with that request. Please try again.