summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-20 19:35:45 -0700
committermo khan <mo@mokhan.ca>2014-02-20 19:35:45 -0700
commitb1bac85f2c8b55e92f0472cbe4e548beb74743d0 (patch)
treeecf290992c11ef8ebbb27cc5ecdc5457733d282c
parent12e544beb49702b876ce0cbd104d881d86b53383 (diff)
remove sqlite and use pg.
-rw-r--r--.gitignore1
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--config/database.yml32
-rw-r--r--config/database.yml.example13
-rw-r--r--db/schema.rb3
6 files changed, 31 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index 6a502e9..318627d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
+database.yml
diff --git a/Gemfile b/Gemfile
index 07b72cf..6636799 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,6 +5,7 @@ gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
+gem 'pg'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
@@ -12,6 +13,5 @@ group :doc do
end
group :development, :test do
- gem 'sqlite3'
gem 'rspec-rails'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index d9888de..797bc91 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -53,6 +53,7 @@ GEM
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.4)
+ pg (0.17.1)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
@@ -97,7 +98,6 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
- sqlite3 (1.3.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
@@ -116,8 +116,8 @@ DEPENDENCIES
coffee-rails (~> 4.0.0)
jbuilder (~> 1.2)
jquery-rails
+ pg
rails (= 4.0.3)
rspec-rails
sdoc
- sqlite3
turbolinks
diff --git a/config/database.yml b/config/database.yml
index 51a4dd4..95db128 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -1,25 +1,15 @@
-# 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: postgresql
+ encoding: unicode
+ database: licenses_dev
pool: 5
- timeout: 5000
+ username: mo
+ password: password
+ host: localhost
-# 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
+ adapter: postgresql
+ database: licenses_test
+ username: mo
+ password: password
+ host: localhost
diff --git a/config/database.yml.example b/config/database.yml.example
new file mode 100644
index 0000000..e598daf
--- /dev/null
+++ b/config/database.yml.example
@@ -0,0 +1,13 @@
+development:
+ adapter: postgresql
+ database: licenses_dev
+ username: <username>
+ password: <password>
+ host: <hostname or ip address. eg.: localhost>
+
+test:
+ adapter: postgresql
+ database: licenses_test
+ username: <username>
+ password: <password>
+ host: <hostname or ip address. eg.: localhost>
diff --git a/db/schema.rb b/db/schema.rb
index 4da550d..37479de 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -13,6 +13,9 @@
ActiveRecord::Schema.define(version: 20140221015819) do
+ # These are extensions that must be enabled in order to support this database
+ enable_extension "plpgsql"
+
create_table "licenses", force: true do |t|
t.datetime "created_at"
t.datetime "updated_at"