diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-20 21:27:06 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-20 21:27:06 -0400 |
commit | 2a7a19c93ee0e0d77e4e388d43f36a721c7ab715 (patch) | |
tree | c5e775bca4600d111d01d1bd7998d3b6252462e6 /db/schema.rb | |
parent | 74b1612e49ebd9cb29efb85f3afeb07f0e8d608a (diff) | |
download | thoughts-2a7a19c93ee0e0d77e4e388d43f36a721c7ab715.tar.gz thoughts-2a7a19c93ee0e0d77e4e388d43f36a721c7ab715.tar.bz2 thoughts-2a7a19c93ee0e0d77e4e388d43f36a721c7ab715.zip |
Added post voting
Diffstat (limited to 'db/schema.rb')
-rw-r--r-- | db/schema.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/db/schema.rb b/db/schema.rb index 3a9e111..f8a8c49 100644 --- a/db/schema.rb +++ b/db/schema.rb | |||
@@ -10,7 +10,7 @@ | |||
10 | # | 10 | # |
11 | # It's strongly recommended that you check this file into your version control system. | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 | ||
13 | ActiveRecord::Schema[7.0].define(version: 2023_10_17_153558) do | 13 | ActiveRecord::Schema[7.0].define(version: 2023_10_20_195330) do |
14 | create_table "active_storage_attachments", force: :cascade do |t| | 14 | create_table "active_storage_attachments", force: :cascade do |t| |
15 | t.string "name", null: false | 15 | t.string "name", null: false |
16 | t.string "record_type", null: false | 16 | t.string "record_type", null: false |
@@ -70,6 +70,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_17_153558) do | |||
70 | t.boolean "published", default: false, null: false | 70 | t.boolean "published", default: false, null: false |
71 | t.datetime "published_at", precision: nil | 71 | t.datetime "published_at", precision: nil |
72 | t.integer "user_id" | 72 | t.integer "user_id" |
73 | t.integer "upvotes", default: 0, null: false | ||
74 | t.integer "downvotes", default: 0, null: false | ||
73 | t.index ["user_id"], name: "index_blogs_on_user_id" | 75 | t.index ["user_id"], name: "index_blogs_on_user_id" |
74 | end | 76 | end |
75 | 77 | ||
@@ -393,6 +395,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_17_153558) do | |||
393 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true | 395 | t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true |
394 | end | 396 | end |
395 | 397 | ||
398 | create_table "votes", force: :cascade do |t| | ||
399 | t.string "votable_type" | ||
400 | t.integer "votable_id" | ||
401 | t.integer "upvote" | ||
402 | t.string "ip" | ||
403 | t.datetime "created_at", null: false | ||
404 | t.datetime "updated_at", null: false | ||
405 | t.index ["votable_type", "votable_id"], name: "index_votes_on_votable" | ||
406 | end | ||
407 | |||
396 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" | 408 | add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" |
397 | add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" | 409 | add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" |
398 | add_foreign_key "blogs", "users" | 410 | add_foreign_key "blogs", "users" |