Add granblue_id to WeaponKeys (#77)

Reimplementing #77
This commit is contained in:
Justin Edmund 2023-03-17 04:30:31 -07:00
parent 472fb6816b
commit cb92210ece
3 changed files with 15 additions and 8 deletions

View file

@ -10,7 +10,7 @@ module Api
}
end
fields :slug, :series, :slot, :group, :order
fields :granblue_id, :slug, :series, :slot, :group, :order
end
end
end

View file

@ -0,0 +1,6 @@
class AddGranblueIdToWeaponKeys < ActiveRecord::Migration[7.0]
def change
# This needs to be NOT NULL, but initially it will be nullable until we migrate data
add_column :weapon_keys, :granblue_id, :integer, unique: true, null: true
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
ActiveRecord::Schema[7.0].define(version: 2023_03_15_095656) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
enable_extension "pg_trgm"
@ -299,6 +299,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.integer "group"
t.integer "order"
t.string "slug"
t.integer "granblue_id"
end
create_table "weapons", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|