Skip to content

Commit 57dc04f

Browse files
committed
postgree
1 parent b88d8a5 commit 57dc04f

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
1010
gem 'rails', '~> 5.0.1'
1111
# Use sqlite3 as the database for Active Record
12-
gem 'sqlite3'
12+
gem 'pg', '~> 0.20.0'
1313
# Use Puma as the app server
1414
gem 'puma', '~> 3.0'
1515
# Use SCSS for stylesheets

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ GEM
187187
oauth2 (~> 1.0)
188188
omniauth (~> 1.2)
189189
orm_adapter (0.5.0)
190+
pg (0.20.0)
190191
pry (0.10.4)
191192
coderay (~> 1.1.0)
192193
method_source (~> 0.8.1)
@@ -270,7 +271,6 @@ GEM
270271
actionpack (>= 4.0)
271272
activesupport (>= 4.0)
272273
sprockets (>= 3.0.0)
273-
sqlite3 (1.3.13)
274274
thor (0.19.4)
275275
thread_safe (0.3.6)
276276
tilt (2.0.7)
@@ -315,6 +315,7 @@ DEPENDENCIES
315315
listen (~> 3.0.5)
316316
omniauth-github
317317
paperclip!
318+
pg (~> 0.20.0)
318319
puma (~> 3.0)
319320
rails (~> 5.0.1)
320321
record_tag_helper (~> 1.0)
@@ -323,7 +324,6 @@ DEPENDENCIES
323324
sass-rails (~> 5.0)
324325
spring
325326
spring-watcher-listen (~> 2.0.0)
326-
sqlite3
327327
turbolinks (~> 5)
328328
tzinfo-data
329329
uglifier (>= 1.3.0)

config/database.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
# gem 'sqlite3'
66
#
77
default: &default
8-
adapter: sqlite3
8+
adapter: postgresql
99
pool: 5
1010
timeout: 5000
1111

1212
development:
1313
<<: *default
14-
database: db/development.sqlite3
14+
database: db/development
1515

1616
# Warning: The database defined as "test" will be erased and
1717
# re-generated from your development database when you run "rake".
1818
# Do not set this db to the same as development or production.
1919
test:
2020
<<: *default
21-
database: db/test.sqlite3
21+
database: db/test
2222

2323
production:
2424
<<: *default
25-
database: db/production.sqlite3
25+
database: db/production

db/schema.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212

1313
ActiveRecord::Schema.define(version: 20170525110358) do
1414

15+
# These are extensions that must be enabled in order to support this database
16+
enable_extension "plpgsql"
17+
1518
create_table "gitrepos", force: :cascade do |t|
1619
t.string "url"
1720
t.datetime "created_at", null: false
1821
t.datetime "updated_at", null: false
1922
t.integer "user_id"
20-
t.index ["user_id"], name: "index_gitrepos_on_user_id"
23+
t.index ["user_id"], name: "index_gitrepos_on_user_id", using: :btree
2124
end
2225

2326
create_table "repositories", force: :cascade do |t|
@@ -28,7 +31,7 @@
2831
t.integer "upload_file_size"
2932
t.datetime "upload_updated_at"
3033
t.integer "user_id"
31-
t.index ["user_id"], name: "index_repositories_on_user_id"
34+
t.index ["user_id"], name: "index_repositories_on_user_id", using: :btree
3235
end
3336

3437
create_table "users", force: :cascade do |t|
@@ -46,8 +49,8 @@
4649
t.datetime "updated_at", null: false
4750
t.string "provider"
4851
t.string "uid"
49-
t.index ["email"], name: "index_users_on_email", unique: true
50-
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
52+
t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
53+
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
5154
end
5255

5356
end

0 commit comments

Comments
 (0)