Skip to content

Commit

Permalink
Add foreign keys for mobility translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Jun 27, 2024
1 parent ed867fb commit db9d1f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions db/migrate/20240627000000_add_foreign_keys_to_mobility.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class AddForeignKeysToMobility < ActiveRecord::Migration[7.1]
def change
add_foreign_key :subject_translations, :subjects
add_foreign_key :program_translations, :programs
add_foreign_key :division_translations, :divisions
end
end
5 changes: 4 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_04_22_200000) do
ActiveRecord::Schema[7.1].define(version: 2024_06_27_000000) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
Expand Down Expand Up @@ -940,6 +940,7 @@
add_foreign_key "commontator_comments", "commontator_threads", column: "thread_id", on_update: :cascade, on_delete: :cascade
add_foreign_key "commontator_subscriptions", "commontator_threads", column: "thread_id", on_update: :cascade, on_delete: :cascade
add_foreign_key "course_self_joins", "courses"
add_foreign_key "division_translations", "divisions"
add_foreign_key "divisions", "programs"
add_foreign_key "feedbacks", "users"
add_foreign_key "imports", "media"
Expand All @@ -951,13 +952,15 @@
add_foreign_key "links", "media", column: "linked_medium_id"
add_foreign_key "medium_tag_joins", "media"
add_foreign_key "medium_tag_joins", "tags"
add_foreign_key "program_translations", "programs"
add_foreign_key "programs", "subjects"
add_foreign_key "quiz_certificates", "media", column: "quiz_id"
add_foreign_key "quiz_certificates", "users"
add_foreign_key "referrals", "items"
add_foreign_key "referrals", "media"
add_foreign_key "speaker_talk_joins", "talks"
add_foreign_key "speaker_talk_joins", "users", column: "speaker_id"
add_foreign_key "subject_translations", "subjects"
add_foreign_key "submissions", "assignments"
add_foreign_key "submissions", "tutorials"
add_foreign_key "talk_tag_joins", "tags"
Expand Down

0 comments on commit db9d1f1

Please sign in to comment.