diff --git a/db/migrate/20200529142235_create_favorite_projects.rb b/db/migrate/20200529142235_create_favorite_projects.rb new file mode 100644 index 0000000..3e9e06e --- /dev/null +++ b/db/migrate/20200529142235_create_favorite_projects.rb @@ -0,0 +1,11 @@ +class CreateFavoriteProjects < ActiveRecord::Migration[6.0] + def change + create_table :favorite_projects do |t| + t.integer :user_id, null: false + t.string :title + + t.timestamps + end + add_index :favorite_projects, :id, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index c1cc81e..6fd18e0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_05_25_132942) do +ActiveRecord::Schema.define(version: 2020_05_29_142235) do create_table "favorite_courses", force: :cascade do |t| t.string "number", null: false @@ -33,6 +33,14 @@ ActiveRecord::Schema.define(version: 2020_05_25_132942) do t.index ["tiss_id"], name: "index_favorite_people_on_tiss_id", unique: true end + create_table "favorite_projects", force: :cascade do |t| + t.integer "user_id", null: false + t.string "title" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["id"], name: "index_favorite_projects_on_id", unique: true + end + create_table "favorite_theses", id: false, force: :cascade do |t| t.integer "id", null: false t.integer "user_id", null: false