This commit is contained in:
João Victor Geonizeli
2022-02-27 17:02:37 -03:00
parent 53c7d35d74
commit 1d692b31f8
13 changed files with 258 additions and 3 deletions

14
db/schema.rb generated
View File

@@ -10,10 +10,20 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2022_02_27_175028) do
ActiveRecord::Schema[7.0].define(version: 2022_02_27_194054) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "posts", force: :cascade do |t|
t.text "content"
t.bigint "user_id", null: false
t.bigint "quoted_post_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["quoted_post_id"], name: "index_posts_on_quoted_post_id"
t.index ["user_id"], name: "index_posts_on_user_id"
end
create_table "user_follows", force: :cascade do |t|
t.bigint "follower_id"
t.bigint "followed_id"
@@ -30,6 +40,8 @@ ActiveRecord::Schema[7.0].define(version: 2022_02_27_175028) do
t.index ["username"], name: "index_users_on_username"
end
add_foreign_key "posts", "posts", column: "quoted_post_id"
add_foreign_key "posts", "users"
add_foreign_key "user_follows", "users", column: "followed_id"
add_foreign_key "user_follows", "users", column: "follower_id"
end