* Update gitignore
There is a mystery postgres folder and we are going to ignore it
* Add migrations
* Update preview state default to pending
* Adds indexes
* Adds PgHero and PgStatements
* Update .gitignore
* Update Gemfile
Production:
- `newrelic_rpm`
Development:
- `pg_query`
- `prosopite`
* Configure Sidekiq
Create job for cleaning up party previews
* Configure Prosopite and remove CacheFreeLogger
* Enable query logging
* Update api_controller.rb
Add N+1 detectioin via Prosopite in development/test environments
* Refactor canonical object blueprints
* Refactor grid object blueprints
* Remove N+1 from grid object models
Reimplementing `character` `summon` and `weapon` was making N+1s which made queries really slow
* Add counter caches to party
* Add preview generation helpers
The Party model can respond to queries about its preview state with the following models:
- `schedule_preview_generation`
- `preview_content_changed?`
- `preview_expired?`
- `should_generate_preview?`
- `ready_for_preview?`
- `needs_preview_generation?`
- `preview_relevant_attributes`
Removes the following methods:
- `schedule_preview_regeneration`
- `preview_relevant_changes?`
* Add cache to is_favorited(user)
* Refactored PartyBlueprint to minimize N+1s
* Remove preview expiry constants
These are defined in the Coordinator instead
* Add method comments
* Create parties_controller.rbs
* Update logic and logs
* Updates excluded methods and calculate_count
* Use `includes` instead of `joins`
* Use a less-insane way of counting
* Adds a helper method for party privacy
* Update filter condition helpers
Just minor refactoring
* Fix old view name in PartyBlueprint
* Refactor parties#create
* Remove redundant return
* Update parties_controller.rbs
* Update parties#index
* Update parties_controller.rb
Updates apply_includes and apply_excludes, along with modifying id_to_table and build_query
* Update parties_controller.rb
Adds the rest of the changes, too tired to write them all out. Some preview generation, some filtering
* Refactor parties#index and parties#favorites
These are mostly the same methods, so we remove common code into build_parties_query and render_paginated_parties
* Alias table name to object to maintain API consistency
* Maintain API consistency with raid blueprint
* Optimize party loading by adding eager loading to `set_from_slug`
- Refactored `set_from_slug` to use `includes` for eager loading associated models:
- `user`, `job`, `raid` (with `group`)
- `characters` (with `character` and `awakening`)
- `weapons` (with `weapon`, `awakenings`, `weapon_key1`, `weapon_key2`, `weapon_key3`)
- `summons` (with `summon`)
- `guidebooks` (`guidebook1`, `guidebook2`, `guidebook3`)
- `source_party`, `remixes`, `skills`, and `accessory`
- This change improves query efficiency by reducing N+1 queries and ensures all relevant associations are preloaded.
- Removed redundant favorite check as it was not necessary in this context.
* Refactor grid blueprints
- **GridCharacterBlueprint:**
- Removed `:minimal` view restriction on `party` association.
- Improved nil checks for `ring1`, `ring2`, and `earring` to prevent errors.
- Converted string values in `awakening_level`, `over_mastery`, and `aetherial_mastery` fields to integers for consistency.
- Ensured `over_mastery` and `aetherial_mastery` only include valid entries, filtering out blank or zero-modifier values.
- **GridWeaponBlueprint:**
- Removed `:minimal` view restriction on `party` association.
- Ensured `weapon` association exists before accessing `ax`, `series`, or `awakening`.
- Improved conditional checks for `weapon_keys` to prevent errors when `weapon` or `series` is nil.
- Converted `awakening_level` field to integer for consistency.
- **GridCharacterBlueprint:**
- Removed `:minimal` view restriction on `party` association.
* Update raid blueprints
- Show flat representation of raid group in RaidBlueprint's nested view
- Show nested representation of raid in RaidGroupBlueprint's full view
* Move n+1 detection to around_action hook
* Improve handling mastery bonuses
- Improved handling of nested attributes:
- Replaced old mastery structure with new `rings` and `awakening` assignments.
- Added `new_rings` and `new_awakening` virtual attributes for easier updates.
- Updated `assign_attributes` to exclude `rings` and `awakening` to prevent conflicts.
- Enhanced parameter transformation:
- Introduced `transform_character_params` to process `rings`, `awakening`, and `earring` more reliably.
- Ensured proper type conversion (`to_i`) for numeric values in `uncap_level`, `transcendence_step`, and `awakening_level`.
- Improved error handling for missing values by setting defaults where needed.
- Optimized database queries:
- Added `.includes(:awakening)` to `set` to prevent N+1 query issues.
- Updated strong parameters:
- Changed `rings` from individual keys (`ring1`, `ring2`, etc.) to a structured array format.
- Refactored permitted attributes to align with the new nested structure.
* Eager-load jobs when querying job skills
* Eager load raids/groups when querying
* Update users_controller.rb
More efficient way of denoting favorited parties.
* Update awakening.rb
- Removes explicitly defined associations and adds ActiveRecord associations instead
* Update party.rb
- Removes favorited accessor
- Renames derivative_parties to remixes and adds in-built sort
* Update weapon_awakening.rb
- Removes redefined explicit associations
* Update grid_character.rb
- Adds code transforming incoming ring and awakening values into something the db understands
* Update character.rb
Add explicit Awakenings enum
* Update coordinator.rb
Adds 'queued' as a state for generation
* Remove ap call
* Fix remix render method
* Downcase username on db end
There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.
* Remove ap call and unused code
* Add granblue.team to cors
This works now!
* Implement all-entity search to support tagging objects (#117)
* Add table for multisearch
* Add new route for searching all entities
* Make models multisearchable
We're going to start with Character, Summon, Weapon and Jobs
* Add method to Search controller
This will search with trigram first, and then if there aren't enough results, search with prefixed text search
* Add support for Japanese all-entity search
* Update grid_summons_controller.rb
Set the proper uncap level for transcended summons
* Search is broken in Japanese!
* Grid model object updates
* Adds has_one association to canonical objects
* GridWeapon is_mainhand refactored
* GridCharacter add_awakening refactored
* (WIP) Add support for inclusion/exclusion + refactor
This commit adds basic support for including/excluding objects from collection filters. There is also a refactor of the filter logic as a whole. It is only implemented in `teams` for now and is a work in progress.
* Update multisearch for exclusions
* Add nicknames to the index for multisearchable
* Add migrations for nicknames
* Rename migrations to be after last migration
* Migrate database
* Update search in models
* Search against nickname columns
* Add dictionary search to EN search so its not only trigrams
* Remove ap call
* Fix remix render method
* Downcase username on db end
There was a bug where users with capital letters in their name could not access their profiles after we tried to make things case insensitive.
* Remove ap call and unused code
* Add granblue.team to cors
This works now!
* Implement all-entity search to support tagging objects (#117)
* Add table for multisearch
* Add new route for searching all entities
* Make models multisearchable
We're going to start with Character, Summon, Weapon and Jobs
* Add method to Search controller
This will search with trigram first, and then if there aren't enough results, search with prefixed text search
* Add support for Japanese all-entity search
* Implements advanced filters (#90)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix a bug where unauthenticated users couldn't view profiles (#92)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix being unable to see profiles when unauth
* Add tables used for Siero's revival (#94)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Deploy unauthenticated profile fix (#93)
* Implements advanced filters (#90)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix a bug where unauthenticated users couldn't view profiles (#92)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix being unable to see profiles when unauth
* Add guidebooks migration
* Implement business logic for reading Guidebooks
* Change to individual guidebook columns
* Properly output guidebook description
* Move to 1-index guidebooks
* Update party-related files for 1-index guidebooks
* Add tables for Siero
* Update download and export scripts
* Support for Siero, raids rework and edit party rework (#96)
* Add guidebooks migration
* Implement business logic for reading Guidebooks
* Change to individual guidebook columns
* Properly output guidebook description
* Move to 1-index guidebooks
* Update party-related files for 1-index guidebooks
* Add tables for Siero
* Add raid groups table
* Update raid model
To belong to the RaidGroup class
* Update job class
To have many job skills
* Add endpoint for raid groups
* Update Raid blueprint with views
* Added down for creating table
* Add guidebooks flag and auto summon flag
* Guidebooks → RaidGroup
* Auto summon → Party
* Add views to Raid blueprint
* Add views and guidebook flag to RaidGroup blueprint
* Add auto summon and Raid view to Party blueprint
* Add quick summons (#97)
* Adds quick summon migration
* Add route to update quick summon
* Add logic to update quick summon
* Remove ap call
* Add logic to updating summon uncap
You couldn't actually update summon transcendence on staging, maybe due to a bug?
Now you can. And it won't let you update outside of the bounds of what is defined on the canonical object.
* Fix summon logic
Updated logic for updating summon uncap and transcendence levels and quick summon status.
* Fix searching in Japanese (#99)
This was broken because we were using the browser-provided locale as a prefix to our method, but that is 'ja' and our methods were prefixed with 'jp'.
* Fix display of base skills (#100)
Base skills were not displaying due to a missing case in our search code. This is now fixed.
* Update awakenings (#101)
* Deploy unauthenticated profile fix (#93)
* Implements advanced filters (#90)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix a bug where unauthenticated users couldn't view profiles (#92)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix being unable to see profiles when unauth
* Add tables used for Siero's revival (#94)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Deploy unauthenticated profile fix (#93)
* Implements advanced filters (#90)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix a bug where unauthenticated users couldn't view profiles (#92)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix being unable to see profiles when unauth
* Add guidebooks migration
* Implement business logic for reading Guidebooks
* Change to individual guidebook columns
* Properly output guidebook description
* Move to 1-index guidebooks
* Update party-related files for 1-index guidebooks
* Add tables for Siero
* Adds guidebooks and gacha tables (#95)
* Implements advanced filters (#90)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix a bug where unauthenticated users couldn't view profiles (#92)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix being unable to see profiles when unauth
* Add tables used for Siero's revival (#94)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Deploy unauthenticated profile fix (#93)
* Implements advanced filters (#90)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix a bug where unauthenticated users couldn't view profiles (#92)
* Implements advanced filters (#90) (#91)
* Add advanced filters
Adds new filters to search:
* Full auto
* Charge attack
* Auto guard
* Number of weapons (user-selectable now)
* Number of summons
* Number of characters
* Maximum number of turns
* Maximum number of buttons
* Maximum clear time
* User quality (No anonymous users)
* Name quality (No untitled teams)
* Remixes (Only show original teams)
* Update advanced filter params
* Add default to party counter cache
* Fix being unable to see profiles when unauth
* Add guidebooks migration
* Implement business logic for reading Guidebooks
* Change to individual guidebook columns
* Properly output guidebook description
* Move to 1-index guidebooks
* Update party-related files for 1-index guidebooks
* Add tables for Siero
* Update download and export scripts
* Support for Siero, raids rework and edit party rework (#96)
* Add guidebooks migration
* Implement business logic for reading Guidebooks
* Change to individual guidebook columns
* Properly output guidebook description
* Move to 1-index guidebooks
* Update party-related files for 1-index guidebooks
* Add tables for Siero
* Add raid groups table
* Update raid model
To belong to the RaidGroup class
* Update job class
To have many job skills
* Add endpoint for raid groups
* Update Raid blueprint with views
* Added down for creating table
* Add guidebooks flag and auto summon flag
* Guidebooks → RaidGroup
* Auto summon → Party
* Add views to Raid blueprint
* Add views and guidebook flag to RaidGroup blueprint
* Add auto summon and Raid view to Party blueprint
* Remove ap call
* Add quick summons (#97)
* Adds quick summon migration
* Add route to update quick summon
* Add logic to update quick summon
* Add logic to updating summon uncap
You couldn't actually update summon transcendence on staging, maybe due to a bug?
Now you can. And it won't let you update outside of the bounds of what is defined on the canonical object.
* Fix summon logic
Updated logic for updating summon uncap and transcendence levels and quick summon status.
* Fix searching in Japanese (#99)
This was broken because we were using the browser-provided locale as a prefix to our method, but that is 'ja' and our methods were prefixed with 'jp'.
* Fix display of base skills (#100)
Base skills were not displaying due to a missing case in our search code. This is now fixed.
* Squash migrations into one file
* Add migrations
This adds migrations and data migrations for the awakening update.
* A new `Awakenings` table now exists that stores all possible awakenings, with a column for object type.
* GridCharacter and GridWeapon now have `awakening_id` and `awakening_level` fields. Their `awakening` and `awakening_type` fields were removed.
* Weapons have a mapping table, `WeaponAwakenings`, as not all weapons can be awakened.
* Data migrations are included to migrate existing user data. They should be run automatically when the migration is run with `rails db:migrate:with_data`
* Add and update models
This updates models for the awakening update.
* Awakening and WeaponAwakening models were added
* Weapon, GridWeapon and GridCharacter models get relationships to the new models defined
* GridCharacter had a validation on `awakening_level` that needed to be fixed
* Update controllers
This updates the GridCharacters and GridWeapons controllers to accept the new fields `awakening_id` and `awakening_level` from clients
* Update blueprints
This updates the blueprints to match the new schema. The new AwakeningBlueprint was accidentally added already, oops.
* Remove re-added migrations
* Implement removing job skills (#103)
This lets users remove job skills, for if they accidentally set them.
* Fix migration