create favorite projects table
This commit is contained in:
parent
724a13347c
commit
bfd58dc7c1
11
db/migrate/20200529142235_create_favorite_projects.rb
Normal file
11
db/migrate/20200529142235_create_favorite_projects.rb
Normal file
@ -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
|
||||||
10
db/schema.rb
10
db/schema.rb
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# 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.define(version: 2020_05_25_132942) do
|
ActiveRecord::Schema.define(version: 2020_05_29_142235) do
|
||||||
|
|
||||||
create_table "favorite_courses", force: :cascade do |t|
|
create_table "favorite_courses", force: :cascade do |t|
|
||||||
t.string "number", null: false
|
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
|
t.index ["tiss_id"], name: "index_favorite_people_on_tiss_id", unique: true
|
||||||
end
|
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|
|
create_table "favorite_theses", id: false, force: :cascade do |t|
|
||||||
t.integer "id", null: false
|
t.integer "id", null: false
|
||||||
t.integer "user_id", null: false
|
t.integer "user_id", null: false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user