summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-09-30 21:10:30 -0600
committermo khan <mo@mokhan.ca>2014-09-30 21:10:30 -0600
commitc8e5e931396e9b8a22a0973f1bc16587aafeeee8 (patch)
tree505b31789ad5742146d454e5a147539eff39f4a7 /db
parent798e574f6f1e8394d14dd13a6ed6b96748ec98b9 (diff)
remove unused columns from user.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20141001025113_remove_location_info_from_user_sessions.rb26
-rw-r--r--db/schema.rb49
2 files changed, 38 insertions, 37 deletions
diff --git a/db/migrate/20141001025113_remove_location_info_from_user_sessions.rb b/db/migrate/20141001025113_remove_location_info_from_user_sessions.rb
new file mode 100644
index 00000000..ed25f4c2
--- /dev/null
+++ b/db/migrate/20141001025113_remove_location_info_from_user_sessions.rb
@@ -0,0 +1,26 @@
+class RemoveLocationInfoFromUserSessions < ActiveRecord::Migration
+ def change
+ remove_column :user_sessions, :latitude
+ remove_column :user_sessions, :longitude
+ remove_column :user_sessions, :city
+ remove_column :user_sessions, :country
+
+ remove_column :users, :remember_created_at
+ remove_column :users, :sign_in_count
+ remove_column :users, :current_sign_in_at
+ remove_column :users, :last_sign_in_at
+ remove_column :users, :current_sign_in_ip
+ remove_column :users, :last_sign_in_ip
+ remove_column :users, :city
+ remove_column :users, :latitude
+ remove_column :users, :longitude
+ remove_column :users, :confirmation_token
+ remove_column :users, :confirmed_at
+ remove_column :users, :confirmation_sent_at
+ remove_column :users, :unconfirmed_email
+ remove_column :users, :failed_attempts
+ remove_column :users, :unlock_token
+ remove_column :users, :locked_at
+ remove_column :users, :invitation_token
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0525e9c0..482f294d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140929024135) do
+ActiveRecord::Schema.define(version: 20141001025113) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -31,8 +31,8 @@ ActiveRecord::Schema.define(version: 20140929024135) do
create_table "avatars", force: true do |t|
t.integer "user_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.string "avatar"
t.boolean "avatar_processing"
t.string "avatar_tmp"
@@ -85,8 +85,8 @@ ActiveRecord::Schema.define(version: 20140929024135) do
t.datetime "failed_at"
t.string "locked_by"
t.string "queue"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
end
add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
@@ -103,8 +103,8 @@ ActiveRecord::Schema.define(version: 20140929024135) do
create_table "interests", force: true do |t|
t.string "name"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
end
create_table "locations", id: :uuid, default: "uuid_generate_v4()", force: true do |t|
@@ -157,15 +157,13 @@ ActiveRecord::Schema.define(version: 20140929024135) do
t.integer "taggings_count", default: 0
end
- add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
-
create_table "tutorials", force: true do |t|
t.string "heading"
t.text "description"
t.string "url"
t.integer "user_id"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
t.string "image_url"
t.string "author"
t.string "author_url"
@@ -182,10 +180,6 @@ ActiveRecord::Schema.define(version: 20140929024135) do
t.string "user_agent"
t.datetime "accessed_at"
t.datetime "revoked_at"
- t.float "latitude"
- t.float "longitude"
- t.string "city"
- t.string "country"
end
add_index "user_sessions", ["accessed_at"], name: "index_user_sessions_on_accessed_at", using: :btree
@@ -194,46 +188,27 @@ ActiveRecord::Schema.define(version: 20140929024135) do
add_index "user_sessions", ["user_id"], name: "index_user_sessions_on_user_id", using: :btree
create_table "users", force: true do |t|
- t.string "email", default: "", null: false
- t.string "encrypted_password", default: "", null: false
+ t.string "email", default: "", null: false
+ t.string "encrypted_password", limit: 128, default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
- t.datetime "remember_created_at"
- t.integer "sign_in_count", default: 0
- t.datetime "current_sign_in_at"
- t.datetime "last_sign_in_at"
- t.string "current_sign_in_ip"
- t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.string "name"
t.string "website"
t.string "twitter"
t.string "facebook"
- t.string "city"
- t.float "latitude"
- t.float "longitude"
t.string "password_salt"
- t.string "confirmation_token"
- t.datetime "confirmed_at"
- t.datetime "confirmation_sent_at"
- t.string "unconfirmed_email"
- t.integer "failed_attempts", default: 0
- t.string "unlock_token"
- t.datetime "locked_at"
t.string "authentication_token"
- t.string "invitation_token"
t.string "full_address"
- t.integer "creations_count", default: 0
+ t.integer "creations_count", default: 0
t.boolean "admin"
end
add_index "users", ["authentication_token"], name: "index_users_on_authentication_token", unique: true, using: :btree
- add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
add_index "users", ["created_at"], name: "index_users_on_created_at", using: :btree
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
- add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true, using: :btree
create_table "users_interests", id: false, force: true do |t|
t.integer "user_id"