1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-10 07:37:25 +00:00

Added a separate table to record background job status for tournaments and fixed migrations/schemas for solid dbs. Foreign key constraints are now added to the migrations where we do belongs_to.

This commit is contained in:
2025-04-15 16:16:44 -04:00
parent 4828d9b876
commit 6e61a7245a
37 changed files with 678 additions and 1169 deletions

View File

@@ -0,0 +1,43 @@
class AddForeignKeys < ActiveRecord::Migration[7.0]
def change
# wrestlers table
add_foreign_key :wrestlers, :schools
add_foreign_key :wrestlers, :weights
# weights table
add_foreign_key :weights, :tournaments
# tournament_delegates table
add_foreign_key :tournament_delegates, :tournaments
add_foreign_key :tournament_delegates, :users
# tournaments table
add_foreign_key :tournaments, :users
# tournament_backups table
add_foreign_key :tournament_backups, :tournaments
# teampointadjusts table
add_foreign_key :teampointadjusts, :wrestlers
add_foreign_key :teampointadjusts, :schools
# school_delegates table
add_foreign_key :school_delegates, :schools
add_foreign_key :school_delegates, :users
# schools table
add_foreign_key :schools, :tournaments
# matches table
add_foreign_key :matches, :tournaments
add_foreign_key :matches, :weights
add_foreign_key :matches, :mats
# mat_assignment_rules table
add_foreign_key :mat_assignment_rules, :mats
add_foreign_key :mat_assignment_rules, :tournaments
# mats table
add_foreign_key :mats, :tournaments
end
end