summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-06-07 17:22:15 -0600
committermo khan <mo@mokhan.ca>2014-06-07 17:22:15 -0600
commit6526365507877575b1e6679cd4e3e260f26526ad (patch)
tree1a2c225c59bb94a2afae1e3465d813df70f66263 /db
parent0de7f0249cdf1fe95cc8f1eaa38d9baf899b4bf4 (diff)
add sha256 to each photo.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20140607232108_add_sha256_to_photos.rb5
-rw-r--r--db/schema.rb34
2 files changed, 20 insertions, 19 deletions
diff --git a/db/migrate/20140607232108_add_sha256_to_photos.rb b/db/migrate/20140607232108_add_sha256_to_photos.rb
new file mode 100644
index 00000000..f3b42e28
--- /dev/null
+++ b/db/migrate/20140607232108_add_sha256_to_photos.rb
@@ -0,0 +1,5 @@
+class AddSha256ToPhotos < ActiveRecord::Migration
+ def change
+ add_column :photos, :sha256, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 164cb9e4..eb2902ac 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: 20140601195859) do
+ActiveRecord::Schema.define(version: 20140607232108) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -30,8 +30,8 @@ ActiveRecord::Schema.define(version: 20140601195859) 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"
@@ -93,8 +93,8 @@ ActiveRecord::Schema.define(version: 20140601195859) 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
@@ -111,13 +111,8 @@ ActiveRecord::Schema.define(version: 20140601195859) do
create_table "interests", force: true do |t|
t.string "name"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
-
- create_table "page_views", force: true do |t|
- t.integer "user_id"
- t.string "url"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
end
create_table "photos", force: true do |t|
@@ -131,6 +126,7 @@ ActiveRecord::Schema.define(version: 20140601195859) do
t.string "original_filename"
t.float "latitude"
t.float "longitude"
+ t.string "sha256"
end
add_index "photos", ["creation_id"], name: "index_photos_on_creation_id", using: :btree
@@ -160,8 +156,8 @@ ActiveRecord::Schema.define(version: 20140601195859) do
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"
@@ -170,12 +166,12 @@ ActiveRecord::Schema.define(version: 20140601195859) do
add_index "tutorials", ["user_id"], name: "index_tutorials_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.integer "sign_in_count", default: 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
@@ -194,13 +190,13 @@ ActiveRecord::Schema.define(version: 20140601195859) do
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.string "unconfirmed_email"
- t.integer "failed_attempts", default: 0
+ 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 "is_admin"
end