From 1e8e311286dda1a7e1b1da8c9444856c3cdc0453 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 19 Oct 2020 04:01:15 -0700 Subject: [PATCH] Make granblue_id a string Character IDs are out of range for integer --- db/migrate/20200913091956_create_weapons.rb | 2 +- db/migrate/20201017013942_create_summons.rb | 42 +++++++++---------- .../20201019103216_create_characters.rb | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/db/migrate/20200913091956_create_weapons.rb b/db/migrate/20200913091956_create_weapons.rb index 0e055b0..01af527 100644 --- a/db/migrate/20200913091956_create_weapons.rb +++ b/db/migrate/20200913091956_create_weapons.rb @@ -3,7 +3,7 @@ class CreateWeapons < ActiveRecord::Migration[6.0] create_table :weapons, id: :uuid, default: -> { "gen_random_uuid()" } do |t| t.string :name_en t.string :name_jp - t.integer :granblue_id + t.string :granblue_id t.integer :rarity t.integer :element diff --git a/db/migrate/20201017013942_create_summons.rb b/db/migrate/20201017013942_create_summons.rb index dfb31f3..def5297 100644 --- a/db/migrate/20201017013942_create_summons.rb +++ b/db/migrate/20201017013942_create_summons.rb @@ -1,26 +1,26 @@ class CreateSummons < ActiveRecord::Migration[6.0] - def change - create_table :summons, id: :uuid, default: -> { "gen_random_uuid()" } do |t| - t.string :name_en - t.string :name_jp - t.integer :granblue_id + def change + create_table :summons, id: :uuid, default: -> { "gen_random_uuid()" } do |t| + t.string :name_en + t.string :name_jp + t.string :granblue_id - t.integer :rarity - t.integer :element - t.string :series + t.integer :rarity + t.integer :element + t.string :series - t.boolean :flb - t.boolean :ulb + t.boolean :flb + t.boolean :ulb - t.integer :max_level - t.integer :min_hp - t.integer :max_hp - t.integer :max_hp_flb - t.integer :max_hp_ulb - t.integer :min_atk - t.integer :max_atk - t.integer :max_atk_flb - t.integer :max_atk_ulb - end - end + t.integer :max_level + t.integer :min_hp + t.integer :max_hp + t.integer :max_hp_flb + t.integer :max_hp_ulb + t.integer :min_atk + t.integer :max_atk + t.integer :max_atk_flb + t.integer :max_atk_ulb + end + end end diff --git a/db/migrate/20201019103216_create_characters.rb b/db/migrate/20201019103216_create_characters.rb index 09a32e0..87982e9 100644 --- a/db/migrate/20201019103216_create_characters.rb +++ b/db/migrate/20201019103216_create_characters.rb @@ -3,7 +3,7 @@ class CreateCharacters < ActiveRecord::Migration[6.0] create_table :characters, id: :uuid, default: -> { "gen_random_uuid()" } do |t| t.string :name_en t.string :name_jp - t.integer :granblue_id + t.string :granblue_id t.integer :rarity t.integer :element