Commit placeholder work

This commit is contained in:
maddiebaka
2023-12-06 15:53:25 -05:00
parent 60f37ece67
commit 709aa882b3
8 changed files with 56 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
class AddUserIdToPartOfSpeech < ActiveRecord::Migration[7.1]
def change
change_table :part_of_speeches do |t|
t.references :user, null: true, foreign_key: true
end
end
end

View File

@@ -0,0 +1,7 @@
class AddSelfReferentialRelationshipToPartOfSpeech < ActiveRecord::Migration[7.1]
def change
change_table :part_of_speeches do |t|
t.references :part_of_speech, null: true, foreign_key: true
end
end
end

8
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2023_10_25_010226) do
ActiveRecord::Schema[7.1].define(version: 2023_10_31_200646) do
create_table "definitions", force: :cascade do |t|
t.string "pos"
t.string "definition"
@@ -40,7 +40,11 @@ ActiveRecord::Schema[7.1].define(version: 2023_10_25_010226) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "language_id", null: false
t.integer "user_id"
t.integer "part_of_speech_id"
t.index ["language_id"], name: "index_part_of_speeches_on_language_id"
t.index ["part_of_speech_id"], name: "index_part_of_speeches_on_part_of_speech_id"
t.index ["user_id"], name: "index_part_of_speeches_on_user_id"
end
create_table "users", force: :cascade do |t|
@@ -64,4 +68,6 @@ ActiveRecord::Schema[7.1].define(version: 2023_10_25_010226) do
add_foreign_key "definitions", "languages"
add_foreign_key "definitions", "words"
add_foreign_key "part_of_speeches", "languages"
add_foreign_key "part_of_speeches", "part_of_speeches"
add_foreign_key "part_of_speeches", "users"
end