From f7e6afb1dcda9babcd26e7609686fee1cefc9695 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 22 Mar 2022 02:29:54 -0700 Subject: [PATCH 1/8] Add class and master level support to db --- db/migrate/20220322080142_create_classes.rb | 14 ++++++++++++++ .../20220322084824_add_class_and_ml_to_party.rb | 6 ++++++ 2 files changed, 20 insertions(+) create mode 100644 db/migrate/20220322080142_create_classes.rb create mode 100644 db/migrate/20220322084824_add_class_and_ml_to_party.rb diff --git a/db/migrate/20220322080142_create_classes.rb b/db/migrate/20220322080142_create_classes.rb new file mode 100644 index 0000000..2a9e840 --- /dev/null +++ b/db/migrate/20220322080142_create_classes.rb @@ -0,0 +1,14 @@ +class CreateClasses < ActiveRecord::Migration[6.0] + def change + create_table :classes, id: :uuid, default: -> { "gen_random_uuid()" } do |t| + t.string :name_en + t.string :name_jp + + t.integer :proficiency1 + t.integer :proficiency2 + + t.string :row + t.boolean :ml, default: false + end + end +end \ No newline at end of file diff --git a/db/migrate/20220322084824_add_class_and_ml_to_party.rb b/db/migrate/20220322084824_add_class_and_ml_to_party.rb new file mode 100644 index 0000000..174b0fe --- /dev/null +++ b/db/migrate/20220322084824_add_class_and_ml_to_party.rb @@ -0,0 +1,6 @@ +class AddClassAndMlToParty < ActiveRecord::Migration[6.1] + def change + add_reference :parties, :class, name: :class_id, type: :uuid, foreign_key: { to_table: :classes } + add_column :parties, :ml, :integer + end +end From 5c40bd144c6d41d026ecb5ec010967d38ced6cd9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 22 Mar 2022 02:30:05 -0700 Subject: [PATCH 2/8] Completely unrelated cleanup migrations --- ...48_add_foreign_key_relations_to_parties.rb | 6 +++ ..._add_foreign_key_relations_to_favorites.rb | 6 +++ ...32_add_foreign_key_relations_to_objects.rb | 12 ++++++ ...d_default_perpetuity_to_grid_characters.rb | 14 +++++++ ...220322092102_add_defaults_to_characters.rb | 9 +++++ .../20220322092252_add_defaults_to_weapons.rb | 24 ++++++++++++ .../20220322092821_add_defaults_to_summons.rb | 24 ++++++++++++ db/schema.rb | 37 +++++++++++++++---- 8 files changed, 125 insertions(+), 7 deletions(-) create mode 100644 db/migrate/20220322085948_add_foreign_key_relations_to_parties.rb create mode 100644 db/migrate/20220322090752_add_foreign_key_relations_to_favorites.rb create mode 100644 db/migrate/20220322090832_add_foreign_key_relations_to_objects.rb create mode 100644 db/migrate/20220322091731_add_default_perpetuity_to_grid_characters.rb create mode 100644 db/migrate/20220322092102_add_defaults_to_characters.rb create mode 100644 db/migrate/20220322092252_add_defaults_to_weapons.rb create mode 100644 db/migrate/20220322092821_add_defaults_to_summons.rb diff --git a/db/migrate/20220322085948_add_foreign_key_relations_to_parties.rb b/db/migrate/20220322085948_add_foreign_key_relations_to_parties.rb new file mode 100644 index 0000000..4c43d9a --- /dev/null +++ b/db/migrate/20220322085948_add_foreign_key_relations_to_parties.rb @@ -0,0 +1,6 @@ +class AddForeignKeyRelationsToParties < ActiveRecord::Migration[6.1] + def change + add_foreign_key :parties, :users + add_foreign_key :parties, :raids + end +end diff --git a/db/migrate/20220322090752_add_foreign_key_relations_to_favorites.rb b/db/migrate/20220322090752_add_foreign_key_relations_to_favorites.rb new file mode 100644 index 0000000..15eff39 --- /dev/null +++ b/db/migrate/20220322090752_add_foreign_key_relations_to_favorites.rb @@ -0,0 +1,6 @@ +class AddForeignKeyRelationsToFavorites < ActiveRecord::Migration[6.1] + def change + add_foreign_key :favorites, :users + add_foreign_key :favorites, :parties + end +end diff --git a/db/migrate/20220322090832_add_foreign_key_relations_to_objects.rb b/db/migrate/20220322090832_add_foreign_key_relations_to_objects.rb new file mode 100644 index 0000000..75e952d --- /dev/null +++ b/db/migrate/20220322090832_add_foreign_key_relations_to_objects.rb @@ -0,0 +1,12 @@ +class AddForeignKeyRelationsToObjects < ActiveRecord::Migration[6.1] + def change + add_foreign_key :grid_characters, :parties + add_foreign_key :grid_characters, :characters + + add_foreign_key :grid_weapons, :parties + add_foreign_key :grid_weapons, :weapons + + add_foreign_key :grid_summons, :parties + add_foreign_key :grid_summons, :summons + end +end diff --git a/db/migrate/20220322091731_add_default_perpetuity_to_grid_characters.rb b/db/migrate/20220322091731_add_default_perpetuity_to_grid_characters.rb new file mode 100644 index 0000000..5f574eb --- /dev/null +++ b/db/migrate/20220322091731_add_default_perpetuity_to_grid_characters.rb @@ -0,0 +1,14 @@ +class AddDefaultPerpetuityToGridCharacters < ActiveRecord::Migration[6.1] + def up + GridCharacter.find_each do |char| + char.perpetuity = false + char.save! + end + + change_column :grid_characters, :perpetuity, :boolean, default: false, null: false + end + + def down + + end +end diff --git a/db/migrate/20220322092102_add_defaults_to_characters.rb b/db/migrate/20220322092102_add_defaults_to_characters.rb new file mode 100644 index 0000000..84ab37c --- /dev/null +++ b/db/migrate/20220322092102_add_defaults_to_characters.rb @@ -0,0 +1,9 @@ +class AddDefaultsToCharacters < ActiveRecord::Migration[6.1] + def up + change_column :characters, :flb, :boolean, default: false, null: false + end + + def down + + end +end diff --git a/db/migrate/20220322092252_add_defaults_to_weapons.rb b/db/migrate/20220322092252_add_defaults_to_weapons.rb new file mode 100644 index 0000000..97ce0f2 --- /dev/null +++ b/db/migrate/20220322092252_add_defaults_to_weapons.rb @@ -0,0 +1,24 @@ +class AddDefaultsToWeapons < ActiveRecord::Migration[6.1] + def up + Weapon.find_each do |w| + if w.flb.nil? + w.flb = false + w.save! + end + + if w.ulb.nil? + w.ulb = false + w.save! + end + end + + change_column :weapons, :flb, :boolean, default: false, null: false + change_column :weapons, :ulb, :boolean, default: false, null: false + change_column :weapons, :ax, :integer, default: 0, null: false + change_column :weapons, :series, :integer, default: -1, null: false + end + + def down + + end +end diff --git a/db/migrate/20220322092821_add_defaults_to_summons.rb b/db/migrate/20220322092821_add_defaults_to_summons.rb new file mode 100644 index 0000000..37e9e58 --- /dev/null +++ b/db/migrate/20220322092821_add_defaults_to_summons.rb @@ -0,0 +1,24 @@ +class AddDefaultsToSummons < ActiveRecord::Migration[6.1] + def change + def up + Summon.find_each do |s| + if s.flb.nil? + s.flb = false + s.save! + end + + if s.ulb.nil? + s.ulb = false + s.save! + end + end + + change_column :summons, :flb, :boolean, default: false, null: false + change_column :summons, :ulb, :boolean, default: false, null: false + end + + def down + + end + end +end diff --git a/db/schema.rb b/db/schema.rb index a41e92d..77765a6 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_03_15_011802) do +ActiveRecord::Schema.define(version: 2022_03_22_092821) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" @@ -29,7 +29,7 @@ ActiveRecord::Schema.define(version: 2022_03_15_011802) do t.integer "gender" t.integer "race1" t.integer "race2" - t.boolean "flb", null: false + t.boolean "flb", default: false, null: false t.integer "min_hp" t.integer "max_hp" t.integer "max_hp_flb" @@ -47,6 +47,15 @@ ActiveRecord::Schema.define(version: 2022_03_15_011802) do t.index ["name_en"], name: "index_characters_on_name_en", opclass: :gin_trgm_ops, using: :gin end + create_table "classes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "name_en" + t.string "name_jp" + t.integer "proficiency1" + t.integer "proficiency2" + t.string "row" + t.boolean "ml", default: false + end + create_table "favorites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "user_id" t.uuid "party_id" @@ -63,7 +72,7 @@ ActiveRecord::Schema.define(version: 2022_03_15_011802) do t.integer "position" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false - t.boolean "perpetuity" + t.boolean "perpetuity", default: false, null: false t.index ["character_id"], name: "index_grid_characters_on_character_id" t.index ["party_id"], name: "index_grid_characters_on_party_id" end @@ -150,6 +159,9 @@ ActiveRecord::Schema.define(version: 2022_03_15_011802) do t.uuid "raid_id" t.integer "element" t.integer "weapons_count" + t.uuid "class_id" + t.integer "ml" + t.index ["class_id"], name: "index_parties_on_class_id" t.index ["user_id"], name: "index_parties_on_user_id" end @@ -214,9 +226,9 @@ ActiveRecord::Schema.define(version: 2022_03_15_011802) do t.integer "rarity" t.integer "element" t.integer "proficiency" - t.integer "series" - t.boolean "flb" - t.boolean "ulb" + t.integer "series", default: -1, null: false + t.boolean "flb", default: false, null: false + t.boolean "ulb", default: false, null: false t.integer "max_level" t.integer "max_skill_level" t.integer "min_hp" @@ -229,11 +241,22 @@ ActiveRecord::Schema.define(version: 2022_03_15_011802) do t.integer "max_atk_ulb" t.boolean "extra", default: false, null: false t.integer "limit" - t.integer "ax" + t.integer "ax", default: 0, null: false t.index ["name_en"], name: "index_weapons_on_name_en", opclass: :gin_trgm_ops, using: :gin end + add_foreign_key "favorites", "parties" + add_foreign_key "favorites", "users" + add_foreign_key "grid_characters", "characters" + add_foreign_key "grid_characters", "parties" + add_foreign_key "grid_summons", "parties" + add_foreign_key "grid_summons", "summons" + add_foreign_key "grid_weapons", "parties" add_foreign_key "grid_weapons", "weapon_keys", column: "weapon_key3_id" + 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", "classes" + add_foreign_key "parties", "raids" + add_foreign_key "parties", "users" end From ae99019f641b98e3a6ec199e3684d6fa635ae11a Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 22 Mar 2022 02:55:56 -0700 Subject: [PATCH 3/8] Rename classes to jobs because reserved words --- .../20220322095311_change_classes_to_jobs.rb | 5 ++++ ...0220322095436_rename_class_id_to_job_id.rb | 5 ++++ db/schema.rb | 26 +++++++++---------- 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 db/migrate/20220322095311_change_classes_to_jobs.rb create mode 100644 db/migrate/20220322095436_rename_class_id_to_job_id.rb diff --git a/db/migrate/20220322095311_change_classes_to_jobs.rb b/db/migrate/20220322095311_change_classes_to_jobs.rb new file mode 100644 index 0000000..2598325 --- /dev/null +++ b/db/migrate/20220322095311_change_classes_to_jobs.rb @@ -0,0 +1,5 @@ +class ChangeClassesToJobs < ActiveRecord::Migration[6.1] + def change + rename_table :classes, :jobs + end +end diff --git a/db/migrate/20220322095436_rename_class_id_to_job_id.rb b/db/migrate/20220322095436_rename_class_id_to_job_id.rb new file mode 100644 index 0000000..4da342a --- /dev/null +++ b/db/migrate/20220322095436_rename_class_id_to_job_id.rb @@ -0,0 +1,5 @@ +class RenameClassIdToJobId < ActiveRecord::Migration[6.1] + def change + rename_column :parties, :class_id, :job_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 77765a6..87c38b3 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_03_22_092821) do +ActiveRecord::Schema.define(version: 2022_03_22_095436) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" @@ -47,15 +47,6 @@ ActiveRecord::Schema.define(version: 2022_03_22_092821) do t.index ["name_en"], name: "index_characters_on_name_en", opclass: :gin_trgm_ops, using: :gin end - create_table "classes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| - t.string "name_en" - t.string "name_jp" - t.integer "proficiency1" - t.integer "proficiency2" - t.string "row" - t.boolean "ml", default: false - end - create_table "favorites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "user_id" t.uuid "party_id" @@ -110,6 +101,15 @@ ActiveRecord::Schema.define(version: 2022_03_22_092821) do t.index ["weapon_id"], name: "index_grid_weapons_on_weapon_id" end + create_table "jobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.string "name_en" + t.string "name_jp" + t.integer "proficiency1" + t.integer "proficiency2" + t.string "row" + t.boolean "ml", default: false + end + create_table "oauth_access_grants", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.uuid "resource_owner_id", null: false t.uuid "application_id", null: false @@ -159,9 +159,9 @@ ActiveRecord::Schema.define(version: 2022_03_22_092821) do t.uuid "raid_id" t.integer "element" t.integer "weapons_count" - t.uuid "class_id" + t.uuid "job_id" t.integer "ml" - t.index ["class_id"], name: "index_parties_on_class_id" + t.index ["job_id"], name: "index_parties_on_job_id" t.index ["user_id"], name: "index_parties_on_user_id" end @@ -256,7 +256,7 @@ ActiveRecord::Schema.define(version: 2022_03_22_092821) 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", "classes" + add_foreign_key "parties", "jobs" add_foreign_key "parties", "raids" add_foreign_key "parties", "users" end From 698968dbfee22a85ba67b89441965c4ac17f70cc Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 22 Mar 2022 02:56:34 -0700 Subject: [PATCH 4/8] Create job.rb --- app/models/job.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/models/job.rb diff --git a/app/models/job.rb b/app/models/job.rb new file mode 100644 index 0000000..ddf6134 --- /dev/null +++ b/app/models/job.rb @@ -0,0 +1,7 @@ +class Job < ApplicationRecord + belongs_to :party + + def display_resource(class) + class.name_en + end +end From 1eec8161118fae620c5ae566b188bf21b6144e99 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 22 Mar 2022 03:40:52 -0700 Subject: [PATCH 5/8] Add order to jobs --- db/migrate/20220322103920_add_order_to_jobs.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20220322103920_add_order_to_jobs.rb diff --git a/db/migrate/20220322103920_add_order_to_jobs.rb b/db/migrate/20220322103920_add_order_to_jobs.rb new file mode 100644 index 0000000..0cd8177 --- /dev/null +++ b/db/migrate/20220322103920_add_order_to_jobs.rb @@ -0,0 +1,5 @@ +class AddOrderToJobs < ActiveRecord::Migration[6.1] + def change + add_column :jobs, :order, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 87c38b3..950774d 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_03_22_095436) do +ActiveRecord::Schema.define(version: 2022_03_22_103920) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" @@ -108,6 +108,7 @@ ActiveRecord::Schema.define(version: 2022_03_22_095436) do t.integer "proficiency2" t.string "row" t.boolean "ml", default: false + t.integer "order" end create_table "oauth_access_grants", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| From c3566944cd3b43074370b3f4d445ce5accc59af9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 22 Mar 2022 03:41:00 -0700 Subject: [PATCH 6/8] Add endpoint for fetching all jobs --- app/controllers/api/v1/jobs_controller.rb | 6 ++++++ app/models/job.rb | 6 +++--- app/views/api/v1/jobs/all.json.rabl | 3 +++ app/views/api/v1/jobs/base.json.rabl | 17 +++++++++++++++++ config/routes.rb | 1 + 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 app/controllers/api/v1/jobs_controller.rb create mode 100644 app/views/api/v1/jobs/all.json.rabl create mode 100644 app/views/api/v1/jobs/base.json.rabl diff --git a/app/controllers/api/v1/jobs_controller.rb b/app/controllers/api/v1/jobs_controller.rb new file mode 100644 index 0000000..f79a40d --- /dev/null +++ b/app/controllers/api/v1/jobs_controller.rb @@ -0,0 +1,6 @@ +class Api::V1::JobsController < Api::V1::ApiController + def all + @jobs = Job.all() + render :all, status: :ok + end +end \ No newline at end of file diff --git a/app/models/job.rb b/app/models/job.rb index ddf6134..1263a02 100644 --- a/app/models/job.rb +++ b/app/models/job.rb @@ -1,7 +1,7 @@ class Job < ApplicationRecord belongs_to :party - - def display_resource(class) - class.name_en + + def display_resource(job) + job.name_en end end diff --git a/app/views/api/v1/jobs/all.json.rabl b/app/views/api/v1/jobs/all.json.rabl new file mode 100644 index 0000000..f39bf78 --- /dev/null +++ b/app/views/api/v1/jobs/all.json.rabl @@ -0,0 +1,3 @@ +collection @jobs, object_root: false + +extends 'jobs/base' diff --git a/app/views/api/v1/jobs/base.json.rabl b/app/views/api/v1/jobs/base.json.rabl new file mode 100644 index 0000000..c806683 --- /dev/null +++ b/app/views/api/v1/jobs/base.json.rabl @@ -0,0 +1,17 @@ +object :job + +attributes :id, :row, :ml, :order + +node :name do |j| + { + :en => j.name_en, + :ja => j.name_jp + } +end + +node :proficiency do |j| + [ + j.proficiency1, + j.proficiency2 + ] +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 7c88858..8532969 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -26,6 +26,7 @@ Rails.application.routes.draw do post 'search/weapons', to: 'search#weapons' post 'search/summons', to: 'search#summons' + get 'jobs', to: 'jobs#all' get 'raids', to: 'raids#all' get 'weapon_keys', to: 'weapon_keys#all' From cf132e20f5f5486551932155277b32abb69a076a Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 4 Apr 2022 23:41:00 -0700 Subject: [PATCH 7/8] Receive and output job data in templates --- app/controllers/api/v1/parties_controller.rb | 2 +- app/models/party.rb | 1 + app/views/api/v1/parties/base.json.rabl | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/parties_controller.rb b/app/controllers/api/v1/parties_controller.rb index 12ecc3d..774b19d 100644 --- a/app/controllers/api/v1/parties_controller.rb +++ b/app/controllers/api/v1/parties_controller.rb @@ -118,6 +118,6 @@ class Api::V1::PartiesController < Api::V1::ApiController end def party_params - params.require(:party).permit(:user_id, :extra, :name, :description, :raid_id) + params.require(:party).permit(:user_id, :extra, :name, :description, :raid_id, :job_id) end end \ No newline at end of file diff --git a/app/models/party.rb b/app/models/party.rb index 20731ba..62db4e8 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -2,6 +2,7 @@ class Party < ApplicationRecord ##### ActiveRecord Associations belongs_to :user, optional: true belongs_to :raid, optional: true + belongs_to :job, optional: true has_many :characters, foreign_key: "party_id", diff --git a/app/views/api/v1/parties/base.json.rabl b/app/views/api/v1/parties/base.json.rabl index fabf183..42dfc00 100644 --- a/app/views/api/v1/parties/base.json.rabl +++ b/app/views/api/v1/parties/base.json.rabl @@ -14,6 +14,10 @@ node :raid do |p| partial('raids/base', :object => p.raid) end +node :job do |p| + partial('jobs/base', :object => p.job) +end + node :characters do |p| partial('grid_characters/base', :object => p.characters) end From ba632af5e708e49edac8cc8fc49791f34473e291 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 10 Apr 2022 13:25:57 -0700 Subject: [PATCH 8/8] Add gender to user database --- app/controllers/api/v1/users_controller.rb | 2 +- app/views/api/v1/users/base.json.rabl | 3 ++- db/migrate/20220410190152_add_gender_to_user.rb | 5 +++++ db/schema.rb | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20220410190152_add_gender_to_user.rb diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 7aec107..a7340e5 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -97,7 +97,7 @@ class Api::V1::UsersController < Api::V1::ApiController def user_params params.require(:user).permit( :username, :email, :password, :password_confirmation, - :granblue_id, :picture, :element, :language, :private + :granblue_id, :picture, :element, :language, :gender, :private ) end end \ No newline at end of file diff --git a/app/views/api/v1/users/base.json.rabl b/app/views/api/v1/users/base.json.rabl index 2c11719..642c3f8 100644 --- a/app/views/api/v1/users/base.json.rabl +++ b/app/views/api/v1/users/base.json.rabl @@ -4,7 +4,8 @@ attributes :id, :username, :granblue_id, :language, - :private + :private, + :gender node :picture do |u| { diff --git a/db/migrate/20220410190152_add_gender_to_user.rb b/db/migrate/20220410190152_add_gender_to_user.rb new file mode 100644 index 0000000..da04710 --- /dev/null +++ b/db/migrate/20220410190152_add_gender_to_user.rb @@ -0,0 +1,5 @@ +class AddGenderToUser < ActiveRecord::Migration[6.1] + def change + add_column :users, :gender, :integer, null: false, default: 0 + end +end diff --git a/db/schema.rb b/db/schema.rb index 950774d..7980348 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_03_22_103920) do +ActiveRecord::Schema.define(version: 2022_04_10_190152) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" @@ -209,6 +209,7 @@ ActiveRecord::Schema.define(version: 2022_03_22_103920) do t.string "language", default: "en", null: false t.boolean "private", default: false, null: false t.string "element", default: "water", null: false + t.integer "gender", default: 0, null: false end create_table "weapon_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|