fixed the primary keys => all the classes have now composite primary key which contais an id + user_id, necessary gem: 'composite_primary_keys' fixed the user_id relation => every class now "belongs_to" user pls kill me know
69 lines
2.8 KiB
Ruby
69 lines
2.8 KiB
Ruby
# This file is auto-generated from the current state of the database. Instead
|
|
# of editing this file, please use the migrations feature of Active Record to
|
|
# incrementally modify your database, and then regenerate this schema definition.
|
|
#
|
|
# This file is the source Rails uses to define your schema when running `rails
|
|
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
|
# be faster and is potentially less error prone than running all of your
|
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
# migrations use external dependencies or application code.
|
|
#
|
|
# It's strongly recommended that you check this file into your version control system.
|
|
|
|
ActiveRecord::Schema.define(version: 2020_05_29_081537) do
|
|
|
|
create_table "favorite_courses", primary_key: ["id", "user_id"], force: :cascade do |t|
|
|
t.integer "id"
|
|
t.integer "user_id"
|
|
t.string "number", null: false
|
|
t.string "semester", null: false
|
|
t.string "title", null: false
|
|
t.string "personal_annotation"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.index ["user_id"], name: "index_favorite_courses_on_user_id"
|
|
end
|
|
|
|
create_table "favorite_people", primary_key: ["tiss_id", "user_id"], force: :cascade do |t|
|
|
t.integer "tiss_id", null: false
|
|
t.integer "user_id"
|
|
t.string "first_name"
|
|
t.string "last_name"
|
|
t.string "picture_uri"
|
|
t.string "personal_annotation"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.index ["user_id"], name: "index_favorite_people_on_user_id"
|
|
end
|
|
|
|
create_table "favorite_projects", primary_key: ["id", "user_id"], force: :cascade do |t|
|
|
t.integer "id", null: false
|
|
t.integer "user_id"
|
|
t.string "title"
|
|
t.string "personal_annotation"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.index ["user_id"], name: "index_favorite_projects_on_user_id"
|
|
end
|
|
|
|
create_table "favorite_theses", primary_key: ["id", "user_id"], force: :cascade do |t|
|
|
t.integer "id", null: false
|
|
t.integer "user_id"
|
|
t.string "title"
|
|
t.string "personal_annotation"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.index ["user_id"], name: "index_favorite_theses_on_user_id"
|
|
end
|
|
|
|
create_table "users", force: :cascade do |t|
|
|
t.string "email", default: "", null: false
|
|
t.string "encrypted_password", default: "", null: false
|
|
t.datetime "remember_created_at"
|
|
t.datetime "created_at", precision: 6, null: false
|
|
t.datetime "updated_at", precision: 6, null: false
|
|
t.index ["email"], name: "index_users_on_email", unique: true
|
|
end
|
|
|
|
end
|