Add cols for supporting Granblue weapon mechanics
Added: - Weapon Key 3 - AX Modifier and Strength - Perpetuity (on Characters) - Slot and Group on WeaponKeys
This commit is contained in:
parent
c7d53d4ffd
commit
e7e0cd790b
9 changed files with 58 additions and 5 deletions
|
|
@ -0,0 +1,5 @@
|
|||
class ChangeWeaponSeriesToNumber < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
change_column :weapons, :series, 'integer USING CAST(element AS integer)'
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class RemoveTimestampsFromWeaponKeys < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
remove_column :weapon_keys, :created_at, :datetime
|
||||
remove_column :weapon_keys, :updated_at, :datetime
|
||||
end
|
||||
end
|
||||
5
db/migrate/20220302050213_add_sub_type_to_weapon_keys.rb
Normal file
5
db/migrate/20220302050213_add_sub_type_to_weapon_keys.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddSubTypeToWeaponKeys < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :weapon_keys, :subtype, :integer
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class AddWeaponKey3ToGridWeapons < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_reference :grid_weapons, :weapon_key3, type: :uuid, foreign_key: { to_table: :weapon_keys }
|
||||
end
|
||||
end
|
||||
8
db/migrate/20220302054011_add_ax_to_grid_weapons.rb
Normal file
8
db/migrate/20220302054011_add_ax_to_grid_weapons.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
class AddAxToGridWeapons < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :grid_weapons, :ax_modifier1, :integer
|
||||
add_column :grid_weapons, :ax_strength1, :float
|
||||
add_column :grid_weapons, :ax_modifier2, :integer
|
||||
add_column :grid_weapons, :ax_strength2, :float
|
||||
end
|
||||
end
|
||||
5
db/migrate/20220302054021_add_element_to_grid_weapons.rb
Normal file
5
db/migrate/20220302054021_add_element_to_grid_weapons.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddElementToGridWeapons < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :grid_weapons, :element, :integer
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class AddPerpetuityToGridCharacters < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
add_column :grid_characters, :perpetuity, :boolean
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class RenameTypeAndSubTypeInWeaponKeys < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
rename_column :weapon_keys, :type, :slot
|
||||
rename_column :weapon_keys, :subtype, :group
|
||||
end
|
||||
end
|
||||
18
db/schema.rb
18
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_28_014758) do
|
||||
ActiveRecord::Schema.define(version: 2022_03_02_071015) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
|
|
@ -60,6 +60,7 @@ ActiveRecord::Schema.define(version: 2022_02_28_014758) do
|
|||
t.integer "position"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.boolean "perpetuity"
|
||||
t.index ["character_id"], name: "index_grid_characters_on_character_id"
|
||||
t.index ["party_id"], name: "index_grid_characters_on_party_id"
|
||||
end
|
||||
|
|
@ -87,10 +88,17 @@ ActiveRecord::Schema.define(version: 2022_02_28_014758) do
|
|||
t.integer "position"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.uuid "weapon_key3_id"
|
||||
t.integer "ax_modifier1"
|
||||
t.float "ax_strength1"
|
||||
t.integer "ax_modifier2"
|
||||
t.float "ax_strength2"
|
||||
t.integer "element"
|
||||
t.index ["party_id"], name: "index_grid_weapons_on_party_id"
|
||||
t.index ["weapon_id"], name: "index_grid_weapons_on_weapon_id"
|
||||
t.index ["weapon_key1_id"], name: "index_grid_weapons_on_weapon_key1_id"
|
||||
t.index ["weapon_key2_id"], name: "index_grid_weapons_on_weapon_key2_id"
|
||||
t.index ["weapon_key3_id"], name: "index_grid_weapons_on_weapon_key3_id"
|
||||
end
|
||||
|
||||
create_table "oauth_access_grants", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
|
@ -187,9 +195,8 @@ ActiveRecord::Schema.define(version: 2022_02_28_014758) do
|
|||
t.string "name_en"
|
||||
t.string "name_jp"
|
||||
t.integer "series"
|
||||
t.integer "type"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.integer "slot"
|
||||
t.integer "group"
|
||||
end
|
||||
|
||||
create_table "weapons", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
|
@ -199,7 +206,7 @@ ActiveRecord::Schema.define(version: 2022_02_28_014758) do
|
|||
t.integer "rarity"
|
||||
t.integer "element"
|
||||
t.integer "proficiency"
|
||||
t.string "series"
|
||||
t.integer "series"
|
||||
t.boolean "flb"
|
||||
t.boolean "ulb"
|
||||
t.integer "max_level"
|
||||
|
|
@ -217,6 +224,7 @@ ActiveRecord::Schema.define(version: 2022_02_28_014758) do
|
|||
t.integer "ax"
|
||||
end
|
||||
|
||||
add_foreign_key "grid_weapons", "weapon_keys", column: "weapon_key3_id"
|
||||
add_foreign_key "oauth_access_grants", "oauth_applications", column: "application_id"
|
||||
add_foreign_key "oauth_access_tokens", "oauth_applications", column: "application_id"
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue