|
|
@ -10,7 +10,16 @@
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
|
|
|
|
|
|
|
|
ActiveRecord::Schema[7.0].define(version: 2023_09_27_123732) do
|
|
|
|
ActiveRecord::Schema[7.0].define(version: 2023_09_27_130526) do
|
|
|
|
|
|
|
|
create_table "characterizations", force: :cascade do |t|
|
|
|
|
|
|
|
|
t.integer "movie_id", null: false
|
|
|
|
|
|
|
|
t.integer "genre_id", null: false
|
|
|
|
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
|
|
|
|
t.index ["genre_id"], name: "index_characterizations_on_genre_id"
|
|
|
|
|
|
|
|
t.index ["movie_id"], name: "index_characterizations_on_movie_id"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
create_table "favorites", force: :cascade do |t|
|
|
|
|
create_table "favorites", force: :cascade do |t|
|
|
|
|
t.integer "movie_id", null: false
|
|
|
|
t.integer "movie_id", null: false
|
|
|
|
t.integer "user_id", null: false
|
|
|
|
t.integer "user_id", null: false
|
|
|
@ -20,6 +29,12 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_27_123732) do
|
|
|
|
t.index ["user_id"], name: "index_favorites_on_user_id"
|
|
|
|
t.index ["user_id"], name: "index_favorites_on_user_id"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create_table "genres", force: :cascade do |t|
|
|
|
|
|
|
|
|
t.string "name"
|
|
|
|
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
|
|
|
|
t.datetime "updated_at", null: false
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
create_table "movies", force: :cascade do |t|
|
|
|
|
create_table "movies", force: :cascade do |t|
|
|
|
|
t.string "title"
|
|
|
|
t.string "title"
|
|
|
|
t.string "rating"
|
|
|
|
t.string "rating"
|
|
|
@ -52,6 +67,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_27_123732) do
|
|
|
|
t.boolean "admin", default: false
|
|
|
|
t.boolean "admin", default: false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_foreign_key "characterizations", "genres"
|
|
|
|
|
|
|
|
add_foreign_key "characterizations", "movies"
|
|
|
|
add_foreign_key "favorites", "movies"
|
|
|
|
add_foreign_key "favorites", "movies"
|
|
|
|
add_foreign_key "favorites", "users"
|
|
|
|
add_foreign_key "favorites", "users"
|
|
|
|
add_foreign_key "reviews", "movies"
|
|
|
|
add_foreign_key "reviews", "movies"
|
|
|
|