From 49c8f55b6c8c79eb653ba729668b2f08fd164f01 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 26 Feb 2022 15:59:33 -0800 Subject: [PATCH] Add element to raids for sorting and fix raid id --- .../20220224044930_fix_raid_association_on_parties.rb | 6 ++++++ db/migrate/20220225014523_add_element_to_raids.rb | 5 +++++ db/schema.rb | 6 +++--- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20220224044930_fix_raid_association_on_parties.rb create mode 100644 db/migrate/20220225014523_add_element_to_raids.rb diff --git a/db/migrate/20220224044930_fix_raid_association_on_parties.rb b/db/migrate/20220224044930_fix_raid_association_on_parties.rb new file mode 100644 index 0000000..3cb03c9 --- /dev/null +++ b/db/migrate/20220224044930_fix_raid_association_on_parties.rb @@ -0,0 +1,6 @@ +class FixRaidAssociationOnParties < ActiveRecord::Migration[6.1] + def change + add_column :parties, :raid_id, :uuid + remove_column :parties, :raids_id, :bigint + end +end diff --git a/db/migrate/20220225014523_add_element_to_raids.rb b/db/migrate/20220225014523_add_element_to_raids.rb new file mode 100644 index 0000000..752588c --- /dev/null +++ b/db/migrate/20220225014523_add_element_to_raids.rb @@ -0,0 +1,5 @@ +class AddElementToRaids < ActiveRecord::Migration[6.1] + def change + add_column :raids, :element, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index dff7168..50a3e79 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_02_24_024415) do +ActiveRecord::Schema.define(version: 2022_02_25_014523) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -130,8 +130,7 @@ ActiveRecord::Schema.define(version: 2022_02_24_024415) do t.boolean "extra", default: false, null: false t.string "name" t.text "description" - t.bigint "raids_id" - t.index ["raids_id"], name: "index_parties_on_raids_id" + t.uuid "raid_id" t.index ["user_id"], name: "index_parties_on_user_id" end @@ -140,6 +139,7 @@ ActiveRecord::Schema.define(version: 2022_02_24_024415) do t.string "name_jp" t.integer "level" t.integer "group" + t.integer "element" end create_table "summons", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|