Skip to content

Commit

Permalink
add postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
pollseed committed Sep 12, 2015
1 parent 9329dbd commit 4e00700
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 46 deletions.
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ group :development, :test do
gem 'guard-bundler'
gem 'guard-livereload'
gem 'guard-rspec', '4.6.4'
gem 'mysql2', '0.3.20'
# gem 'mysql2', '0.3.20'
gem 'pg', '0.18.3'
end

group :test do
Expand All @@ -59,7 +60,8 @@ group :test do
gem 'shoulda-matchers', '2.8.0'
gem 'rails-erd', '1.4.2'
# gem 'coveralls', require: false
gem 'mysql2', '0.3.20'
# gem 'mysql2', '0.3.20'
gem 'pg', '0.18.3'
end

group :production do
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ GEM
minitest (5.8.0)
multi_json (1.11.2)
multipart-post (2.0.0)
mysql2 (0.3.20)
naught (1.0.0)
nenv (0.2.0)
net-scp (1.2.1)
Expand Down Expand Up @@ -384,7 +383,6 @@ DEPENDENCIES
jbuilder (= 2.3.1)
jquery-rails (= 4.0.5)
less-rails (= 2.7.0)
mysql2 (= 0.3.20)
oauth (~> 0.4.0)
omniauth (~> 1.2.0)
omniauth-twitter (= 1.2.1)
Expand Down
7 changes: 4 additions & 3 deletions config/database.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
default: &default
adapter: mysql2
# adapter: mysql2
adapter: postgresql
encoding: utf8
pool: 5
username: root
password: password
development:
<<: *default
database: harmox
socket: /private/tmp/mysql.sock
# socket: /private/tmp/mysql.sock
username: root
password: password
# host: 127.0.0.1
Expand All @@ -17,4 +18,4 @@ test:
production:
<<: *default
database: harmox
socket: /var/lib/mysql/mysql.sock
# socket: /var/lib/mysql/mysql.sock
81 changes: 42 additions & 39 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,70 @@

ActiveRecord::Schema.define(version: 20150904144727) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

create_table "bot_hash_tag_rels", force: :cascade do |t|
t.integer "bot_id", limit: 4
t.integer "hash_tag_id", limit: 4
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "bot_id"
t.integer "hash_tag_id"
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "bots", force: :cascade do |t|
t.integer "user_id", limit: 4, null: false
t.string "twitter_name", limit: 255
t.string "twitter_id", limit: 255, null: false
t.string "access_token", limit: 255
t.string "access_secret", limit: 255
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "user_id", null: false
t.string "twitter_name"
t.string "twitter_id", null: false
t.string "access_token"
t.string "access_secret"
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "hash_tags", force: :cascade do |t|
t.string "hash_tag", limit: 255, null: false
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "hash_tag", null: false
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "realtime_bot_hash_tag_trackings", force: :cascade do |t|
t.integer "bot_id", limit: 4, null: false
t.integer "bot_type", limit: 4
t.text "content", limit: 65535
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "bot_id", null: false
t.integer "bot_type"
t.text "content"
t.boolean "deleted", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "schedules", force: :cascade do |t|
t.integer "user_id", limit: 4, null: false
t.integer "bot_id", limit: 4, null: false
t.time "time", null: false
t.integer "weekday", limit: 4, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "user_id", null: false
t.integer "bot_id", null: false
t.time "time", null: false
t.integer "weekday", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

add_index "schedules", ["bot_id"], name: "by_bot_id", unique: true, using: :btree
add_index "schedules", ["user_id"], name: "by_user_id", unique: true, using: :btree

create_table "users", force: :cascade do |t|
t.string "email", limit: 255, default: "", null: false
t.string "encrypted_password", limit: 255, default: "", null: false
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.datetime "remember_created_at"
t.integer "sign_in_count", limit: 4, default: 0, null: false
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip", limit: 255
t.string "last_sign_in_ip", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "username", limit: 255
t.string "provider", limit: 255
t.string "uid", limit: 255
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "username"
t.string "provider"
t.string "uid"
end

add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree
Expand Down

0 comments on commit 4e00700

Please sign in to comment.