Add job skills to database

This commit is contained in:
Justin Edmund 2022-12-01 04:46:24 -08:00
parent ae36ff59b4
commit 8e5571265f
3 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,9 @@
class AddJobSkillsToParty < ActiveRecord::Migration[6.1]
def change
change_table(:parties) do |t|
t.references :skill1, type: :uuid, foreign_key: { to_table: 'job_skills' }
t.references :skill2, type: :uuid, foreign_key: { to_table: 'job_skills' }
t.references :skill3, type: :uuid, foreign_key: { to_table: 'job_skills' }
end
end
end

View file

@ -0,0 +1,7 @@
class AddSkill0ToParty < ActiveRecord::Migration[6.1]
def change
change_table(:parties) do |t|
t.references :skill0, type: :uuid, foreign_key: { to_table: "job_skills" }
end
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_11_20_145204) do
ActiveRecord::Schema.define(version: 2022_12_01_123645) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
@ -177,7 +177,15 @@ ActiveRecord::Schema.define(version: 2022_11_20_145204) do
t.integer "weapons_count"
t.uuid "job_id"
t.integer "ml"
t.uuid "skill1_id"
t.uuid "skill2_id"
t.uuid "skill3_id"
t.uuid "skill0_id"
t.index ["job_id"], name: "index_parties_on_job_id"
t.index ["skill0_id"], name: "index_parties_on_skill0_id"
t.index ["skill1_id"], name: "index_parties_on_skill1_id"
t.index ["skill2_id"], name: "index_parties_on_skill2_id"
t.index ["skill3_id"], name: "index_parties_on_skill3_id"
t.index ["user_id"], name: "index_parties_on_user_id"
end
@ -273,6 +281,10 @@ ActiveRecord::Schema.define(version: 2022_11_20_145204) do
add_foreign_key "grid_weapons", "weapons"
add_foreign_key "oauth_access_grants", "oauth_applications", column: "application_id"
add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id"
add_foreign_key "parties", "job_skills", column: "skill0_id"
add_foreign_key "parties", "job_skills", column: "skill1_id"
add_foreign_key "parties", "job_skills", column: "skill2_id"
add_foreign_key "parties", "job_skills", column: "skill3_id"
add_foreign_key "parties", "jobs"
add_foreign_key "parties", "raids"
add_foreign_key "parties", "users"