Compare commits

...

135 commits

Author SHA1 Message Date
b31d9f8b9e Remove files that don't belong here 2023-03-16 05:12:03 -07:00
5d9bd5c647 Merge branch 'character-skills' into quick-summons 2023-03-16 05:09:27 -07:00
fe6b79f070 Migrate database 2023-03-16 05:09:10 -07:00
edb7273589 Merge branch 'job-mastery' into character-skills 2023-03-16 05:07:58 -07:00
3f31919a36 Migrate database 2023-03-16 05:07:28 -07:00
51112e8162 Merge branch 'add-granblue-id-keys' into job-mastery 2023-03-16 05:05:46 -07:00
d10b892490 Migrate database 2023-03-16 05:05:25 -07:00
2455c06f99 Add nicknames fields to objects 2023-03-15 04:36:40 -07:00
22a4bc9c86 Add quick summon to blueprint 2023-03-15 04:36:29 -07:00
3f544dcb6f Add quick summons column to GridSummons 2023-03-15 04:36:29 -07:00
caaafe84d8 Add full auto toggles to GridCharacter 2023-03-15 04:36:01 -07:00
8bef63d521 Add tables for storing character skills and effects 2023-03-15 04:24:06 -07:00
1fe6f45cae Add Ultimate Mastery 2023-03-15 04:03:25 -07:00
71a217d33f Rename ml to master level 2023-03-15 04:02:39 -07:00
8ff5a5a1e9 Add granblue_id to WeaponKeyBlueprint 2023-03-15 03:04:11 -07:00
74a70b8ecd Add granblue_id column to WeaponKeys table
This should have a `NOT NULL` constraint, but due to existing data it is nullable until we can update all environments with values.
2023-03-15 03:03:58 -07:00
2596e2785a
Update README.md 2023-02-05 23:42:52 -08:00
39567fcefd
Update README.md 2023-02-05 23:42:00 -08:00
9247e38353 Regenerate credentials 2023-02-05 00:07:32 -08:00
31c9245c98 Merge branch 'main' of github.com:jedmund/hensei-api into staging 2023-02-05 00:06:31 -08:00
5f92d64373
Merge pull request #71 from jedmund/unauth-remix
Assign local ID when remixing as unauthorized account
2023-02-03 19:33:27 -08:00
a123e5fe23 Assign local ID when remixing as unauth 2023-02-03 19:32:22 -08:00
bdb68f17a9 Fix bug in party controller authorization 2023-02-02 02:28:46 -08:00
c5ecd8d6e9
Merge pull request #70 from jedmund/download-images-task
Update download tasks
2023-02-02 02:28:16 -08:00
36761f0185 Update download tasks
* Renames old `download_images` task to `download_all_images`
* Creates a new task for downloading images for a specific list of granblue IDs
2023-02-02 02:27:16 -08:00
b05670bbd3 Remove log 2023-02-01 21:46:24 -08:00
260ca449a7 GridWeapon decides if it is mainhand or not 2023-02-01 21:45:57 -08:00
2dd6dbae57
Merge pull request #69 from jedmund/info_endpoints
Add endpoints for getting info about canonical items
2023-01-31 22:18:05 -08:00
6e837e5d18 Add endpoints for getting info about canonical items 2023-01-31 21:48:00 -08:00
6bbeeb3df2
Merge pull request #68 from jedmund/unauth-teams
Allow editing of unauth teams
2023-01-31 03:13:43 -08:00
7d576c3485 Update controllers to properly authorize
For some of these, they weren't authorizing at all, so this is a good safety improvement
2023-01-31 02:51:38 -08:00
4b7b48cbd3 Create edit_key global in ApiController 2023-01-31 02:51:13 -08:00
6b24970c54 Edit key should create before create, not save 2023-01-31 02:51:01 -08:00
e45dabf39a Save edit key for parties with no user ID 2023-01-31 00:55:17 -08:00
cce33ebf08 Add local_id to Party object
We can't save in the user_id column because it is an association, but that's okay
2023-01-31 00:54:17 -08:00
bedd72a753 Add edit_key to Parties output on create
We create a new view `created` that includes the `full` view but adds the `edit_key` param
2023-01-31 00:29:29 -08:00
c4ae38a432 Add edit key to Parties table 2023-01-31 00:28:58 -08:00
e13bc6f636
Merge pull request #67 from jedmund/add-job-accessory-to-blueprint
Add job accessory boolean and type to output
2023-01-30 04:09:12 -08:00
c0bc62acc2 Add job accessory boolean and type to output
This whole commit from before seems to have disappeared
2023-01-30 04:08:45 -08:00
0ae9b5ba6b
Merge pull request #66 from jedmund/add-migration
Make migration more robust
2023-01-30 03:48:49 -08:00
50c9dbe7b3 Make migration more robust 2023-01-30 03:48:12 -08:00
05ea4a41f3
Merge pull request #65 from jedmund/add-migration
Add missing migration
2023-01-30 03:45:57 -08:00
8d68a97ab1 Add missing migration 2023-01-30 03:45:09 -08:00
91fdbfe393
Merge pull request #64 from jedmund/fix-weapon-conflicts
Small change to assist with weapon conflicts
2023-01-29 23:38:14 -08:00
df21dd6f37 Send replace position 2023-01-29 23:37:24 -08:00
1474580d37
Merge pull request #63 from jedmund/fix-users-response
Fix response when requesting nonexistent user
2023-01-28 20:51:08 -08:00
6c12b1937a Fix response when requesting nonexistent user 2023-01-28 20:50:35 -08:00
8fb6fab0d7
Merge pull request #62 from jedmund/fix-blueprint
Remove accessory fields from JobBlueprint
2023-01-28 04:20:10 -08:00
c336aef449 Remove accessory fields from JobBlueprint 2023-01-28 04:19:53 -08:00
54ed380d57
Merge pull request #61 from jedmund/fix-base-skills
Fix bug preventing selection of base skills
2023-01-28 02:38:31 -08:00
651a7ff5f6
Merge pull request #60 from jedmund/fix-yatima
Fix limit when adding summons
2023-01-28 02:38:19 -08:00
d39dca337b
Merge pull request #58 from jedmund/remove-weapon-count
Fix counter caches
2023-01-28 02:38:07 -08:00
3dc606de9e Fix bug preventing selection of base skills 2023-01-28 02:36:48 -08:00
7a290c2945 Fix limit when adding summons 2023-01-28 02:20:52 -08:00
6c084610ad Fix counter caches 2023-01-28 01:19:46 -08:00
2c4d8b6fe1 Add source party to output 2023-01-28 00:23:06 -08:00
906faaeb1e Change view for remixes 2023-01-28 00:01:40 -08:00
986ef2fb56 Add remix state and remixes to output 2023-01-27 23:33:28 -08:00
1e0ada0613
Merge pull request #56 from jedmund/shields-manabelly
Add accessory output
2023-01-27 11:54:09 -08:00
584fd31776 Update job_blueprint.rb 2023-01-27 11:53:30 -08:00
5025f51d04
Merge pull request #55 from jedmund/updates
Adds support for managing app updates
2023-01-25 22:56:20 -08:00
8bd78d7764 Add version field 2023-01-25 20:03:00 -08:00
159439a67e Rename to version 2023-01-25 20:02:56 -08:00
c70290d6d5 Add primary key to migration 2023-01-25 19:30:06 -08:00
caf357a84d Add support for AppUpdates
* Added model
* Added blueprint
* Added method to ApiController
* Added route
2023-01-25 19:27:49 -08:00
7911374c1e Add updates table 2023-01-25 19:12:29 -08:00
bc14ac80ec Update rake task for manaturas 2023-01-25 18:56:52 -08:00
404720d259 Add relation to Party and output in Blueprint 2023-01-24 02:38:09 -08:00
7d142ada54 Add accessory_id to Party and enable saving
Saves without validation right now
2023-01-24 02:11:54 -08:00
ea7650a9bb Add controller, blueprint and route for JobAccessories 2023-01-23 20:52:20 -08:00
c474d8030b Add rake task for downloading job accessory images 2023-01-23 20:52:10 -08:00
0ff7e7a8dd Add JobAccessory model and add type to schema
We need type because we don't want to hardcode job ids in scripts
2023-01-23 20:52:06 -08:00
7de4bb6863 Add job accessories table 2023-01-23 17:03:41 -08:00
95748db677
Merge pull request #53 from jedmund/add-host-to-rails7
Add host to development environment file
2023-01-23 01:20:56 -08:00
90f2f6e390 Add host to development environment file 2023-01-23 01:20:39 -08:00
1f785d4695
Merge pull request #52 from jedmund/rails7
Properly update to Rails 7
2023-01-23 01:02:45 -08:00
3ced0c6523 Upgrade to rails 7 2023-01-23 01:01:08 -08:00
5b7a61c3bb Add sprockets to gemfile 2023-01-23 00:53:57 -08:00
7d7c96df80
Merge pull request #51 from jedmund/fix-staging-2023012302
Attempt to fix staging by updating gems
2023-01-23 00:44:11 -08:00
cbfe7ce2da Attempt to fix staging by updating gems 2023-01-23 00:42:55 -08:00
bb7d32d262
Merge pull request #50 from jedmund/fix-staging-20230123
Attempt to fix staging (2023-01-23)
2023-01-23 00:01:43 -08:00
31240936ab Move bootsnap back 2023-01-23 00:00:56 -08:00
fcbf97fe0a Recreate schema.rb 2023-01-23 00:00:38 -08:00
6bf100a830
Merge pull request #49 from jedmund/fix-staging-20230122
Attempt to fix staging (2023-01-22)
2023-01-22 23:48:18 -08:00
ec0549cd18
Merge branch 'staging' into fix-staging-20230122 2023-01-22 23:48:11 -08:00
098fdbffa8 Attempt moving Gemfile 2023-01-22 23:45:49 -08:00
a1967bbd2c
Merge pull request #46 from jedmund/job-icons
Adds support for Granblue IDs on Jobs
2023-01-22 23:15:39 -08:00
99578d33ee
Merge branch 'staging' into job-icons 2023-01-22 23:15:31 -08:00
0797306569
Merge pull request #47 from jedmund/transcendence
Adds support for transcendence
2023-01-22 23:14:40 -08:00
559f30226d
Merge pull request #45 from jedmund/summon-renewal
Update summon grid features
2023-01-22 23:13:08 -08:00
ee7085f65e
Merge branch 'staging' into summon-renewal 2023-01-22 23:12:57 -08:00
9fea1350b3
Merge pull request #39 from jedmund/remix-teams
Implements remixing teams
2023-01-22 23:10:05 -08:00
6ecc2a706c
Merge branch 'staging' into remix-teams 2023-01-22 23:09:55 -08:00
d91fd72431
Merge pull request #38 from jedmund/character-mods
Implements mods on GridCharacter
2023-01-22 23:08:59 -08:00
ed76afe44c Add granblue_id to Job output 2023-01-22 22:31:25 -08:00
4ee65aecd3 Add Rake task for creating a list of Job icon URLs 2023-01-22 22:25:02 -08:00
67146e3ab3 Add Granblue ID instead of slug 2023-01-22 21:59:43 -08:00
54948e4435 Add slug to Jobs table 2023-01-22 21:56:08 -08:00
a8a0a5944c Merge branch 'summon-renewal' into transcendence 2023-01-22 21:24:28 -08:00
d343adeca3 Merge branch 'character-mods' into summon-renewal 2023-01-22 21:24:14 -08:00
bd15d91cdd Fix grid character creation
Grid characters were only replacing the character when replacing an existing character, so the mods were persisted. This creates a new GridCharacter every time a replacement happens and destroys the old one.
2023-01-22 21:24:00 -08:00
5460a1d167 Reset transcendence step on uncap 2023-01-22 21:02:19 -08:00
b248fb62ea Add transcendence_step to output 2023-01-22 21:02:06 -08:00
717c08ea8f Update summon task to download XLB images 2023-01-22 21:01:58 -08:00
422651668e Permit transcendence_step 2023-01-22 20:41:24 -08:00
8c1fae02d4 Add update method to GridSummonsController 2023-01-22 20:37:52 -08:00
bb79f68a2c Remove extraneous code 2023-01-22 20:37:15 -08:00
cfee8b0b31 Support for frontend transcendence
Set transcendence step when updating uncap level
2023-01-22 19:58:45 -08:00
cf270f0243 Add XLB and stats to JSON output 2023-01-22 19:57:57 -08:00
65d8024476 Add XLB stat fields 2023-01-22 19:57:49 -08:00
67cc1138e6 Implements limits on GridSummons 2023-01-21 18:44:25 -08:00
c5f2c9d080 Implement deleting summons 2023-01-21 15:41:16 -08:00
633db43e94 Implement removing characters and weapons 2023-01-20 21:39:20 -08:00
73022778f6 Add server-side validation for OM and AM rings
Note: Over mastery is not validating properly yet
2023-01-09 01:51:38 -08:00
18ca78a272 Implement localized remix names 2023-01-09 00:29:12 -08:00
f73593d8e1 Blank values using defaults instead of null 2023-01-09 00:29:01 -08:00
79b9b4e225 Exclude certain values from remixing 2023-01-09 00:05:18 -08:00
b6e8dd93b1 Add party validation and inverse to GridObject associations 2023-01-08 21:50:30 -08:00
fa2962ae1c Add remix method to parties controller 2023-01-08 21:50:30 -08:00
a3e76d53e7 Add amoeba configuration to Party 2023-01-08 21:50:30 -08:00
1925678888 Return when no params 2023-01-08 21:50:30 -08:00
b0b446aba3 Fix set_from_slug 2023-01-08 21:50:30 -08:00
433bd19f6d Fix party creation 2023-01-08 21:50:30 -08:00
2a465aca3b Move shortcode setting to before_save on Party model 2023-01-08 21:50:30 -08:00
c2576973bb Add source party column to parties 2023-01-08 21:50:30 -08:00
70bbd47606 Add endpoint and stub method 2023-01-08 21:49:57 -08:00
24b15c0740 Add amoeba gem for cloning ActiveRecord objects 2023-01-08 21:49:57 -08:00
3f914d3be7 Merge branch 'main' into character-mods 2023-01-08 05:54:00 -08:00
8f9bd0077e Add new fields to output of GridCharacter 2023-01-07 07:51:54 -08:00
3617088418 Add update method for GridCharacter and other utils
* Add check_authorization for before update and eventually destroy runs
* Update permitted parameters
2023-01-07 07:51:40 -08:00
5351123aa2 Add basic validation for various mastery bonuses
* Ensure transcendence is possible on that character
* Ensure transcendence_step is in bounds
* Ensure Over Mastery Attack is a valid value
* Ensure Over Mastery HP is a valid value
* Ensure Over Mastery Attack is 2x Over Mastery HP
* Ensure Awakening level is in bounds
2023-01-07 07:51:04 -08:00
beb9f5aa0c Add GridCharacters#update route 2023-01-07 07:49:39 -08:00
a2fff663d6 More database updates for mastery cols
* Awakening should be jsonb
* All mastery columns are not nullable
2023-01-07 07:49:28 -08:00
7404bcbac9 Change mastery columns to use jsonb
5 columns better than 10
2023-01-07 05:33:16 -08:00
6cf9c8d2ae Create 20230106023753_change_awakening_type_default_value.rb 2023-01-06 01:29:09 -08:00
16 changed files with 240 additions and 22 deletions

2
.gitignore vendored
View file

@ -44,3 +44,5 @@ config/application.yml
.idea/*
.vscode/*
/config/credentials/production.key

View file

@ -1,24 +1,40 @@
# README
# hensei-api
This README would normally document whatever steps are necessary to get the
application up and running.
**hensei-api** is the backend for [granblue.team](https://app.granblue.team/), an app for saving and sharing teams for [Granblue Fantasy](https://game.granbluefantasy.jp).
Things you may want to cover:
**Please note that these instructions are a work-in-progress!**
* Ruby version
### Installing Ruby
* System dependencies
You'll need to install ruby-3.0.0. We recommend using [RVM](https://rvm.io/) and creating a gemset to manage your Ruby installation. Before proceeding, install the GPG keys from the official RVM website.
* Configuration
```
\curl -sSL https://get.rvm.io | bash -s stable
rvm install ruby-3.0.0
rvm use 3.0.0@granblue --create
```
* Database creation
### Installing dependencies
* Database initialization
After cloning the repo, install the project dependencies with:
* How to run the test suite
```
bundle install
```
* Services (job queues, cache servers, search engines, etc.)
### Creating the database
* Deployment instructions
Once the dependencies have been installed, you'll need to create and seed the database. Seed data is provided but may not be up-to-date!
* ...
```
rails db:create
rails db:migrate
rails db:seed
```
### Running the server
Then, you can start the server with:
```
rails server
```

View file

@ -9,7 +9,7 @@ module Api
end
view :nested do
fields :main, :friend, :position, :uncap_level, :transcendence_step
fields :main, :friend, :position, :quick_summon, :uncap_level, :transcendence_step
association :summon, name: :object, blueprint: SummonBlueprint
end

View file

@ -17,7 +17,9 @@ module Api
]
end
fields :granblue_id, :row, :ml, :order, :accessory, :accessory_type
fields :granblue_id, :row, :order,
:master_level, :ultimate_mastery,
:accessory, :accessory_type
end
end
end

View file

@ -52,6 +52,7 @@ module Api
end
view :jobs do
association :job,
blueprint: JobBlueprint
include_view :job_skills
@ -68,7 +69,9 @@ module Api
include_view :characters
include_view :job_skills
fields :local_id, :description, :charge_attack, :button_count, :turn_count, :chain_count
fields :local_id, :description, :charge_attack,
:button_count, :turn_count, :chain_count,
:master_level, :ultimate_mastery
association :accessory,
blueprint: JobAccessoryBlueprint

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

@ -1 +1 @@
d2FydGGNzmcDxx3yD8kWlU7vquTJA/QHjPxZhjcoV65DZYU2JgRZSwL+zzE+Vl4bfXtkHKXhyI821y2DvcCtFpHPmNuUncmvmt+jq9mkrK1KuQts9FLshzw1JdCDioGr+JUmMmb55nPChtHUTnd+eW7BXi9KfBtogA9vDlkEG47epYKv0Wn99ziOP/fyvIPVC+nRtUePHQvDAqIENK7doHDKoDhNkhYbCNwH8Xa+F+kZNVKMgpyoCkNDPg10NyUhub7rHBEX41xGeluZVGAkG6HsBB1XNHAkyCQroBKh/XTHZ4brCTeaoJHL3W+/nwZrRDnBVWl7p6lh17JGgfmTzx/oNBqk/FJHR9lfAdkh/msrqpl5YlnsB9nY6vmjEEX4epylGYWDndoo0INYLawOZp1xFgQFedPb7ZU5--f6jX9dWlDgeyy6gd--nHpeshtZQBL1eBzNeocBoA==
Fxc8acnxWOFdt+zwWoACR/fskFH2+ZY5izq5cHf8pnGDKRSoI7QYm0h8RwevJtRUvUJQsJ+ja/xzbTYxNC4ABRSBe06lXwHJuCnt5YtR+4l+NiFnS76kGzSfhlfhmvPLtSdfTVRfhRib1vrz7E38jM1pcc2QBkzCxyaoZRu3X65U+gc7EqTjOsg8wpTjJwvfTXW9gkFNwFSen3nOSytewYDcivwUjr/3NUAONKHn4rNhBN3UJiNgOSCGj77Xx60E0Q95CidbkgExcyKAIMMsQgLKGhQRr9yUGxdshMuhA3JhVQSyvtd+jX8PmNX3FQusQIg7YUCh/WpiKo3aimZLQYY2n7lbfeSLpwuishjn138GAxe59Wgm1JhKN4xAkcAq54Q9d4AGFnu/IphMhv1TO03CqnwX1BbfY142--n8Fil7/q3W/SrENe--J31ORG+51iIo29fjiZU3Uw==

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

@ -0,0 +1,6 @@
class AddUltimateMastery < ActiveRecord::Migration[7.0]
def change
add_column :parties, :ultimate_mastery, :integer, null: true
add_column :jobs, :ultimate_mastery, :boolean, default: false, null: false
end
end

View file

@ -0,0 +1,7 @@
class RenameMasterLevel < ActiveRecord::Migration[7.0]
def change
rename_column :parties, :ml, :master_level
rename_column :jobs, :ml, :master_level
change_column_null :jobs, :master_level, false
end
end

View file

@ -0,0 +1,32 @@
class CreateEffects < ActiveRecord::Migration[7.0]
def change
create_table :effects, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.string :name_en, null: false
t.string :name_jp, null: false
t.string :description_en, null: false
t.string :description_jp, null: false
t.integer :accuracy_value
t.string :accuracy_suffix
t.string :accuracy_comparator
t.jsonb :strength, array: true
# {
# "min": integer,
# "max": integer,
# "value": integer,
# "suffix": string
# }
t.integer :healing_cap
t.boolean :duration_indefinite, default: false, null: false
t.integer :duration_value
t.string :duration_unit
t.string :notes_en
t.string :notes_jp
end
end
end

View file

@ -0,0 +1,25 @@
class CreateCharacterSkills < ActiveRecord::Migration[7.0]
def change
create_table :character_skills, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.references :character, type: :uuid
t.string :name_en, unique: true, null: false
t.string :name_jp, unique: true, null: false
t.string :description_en, unique: true, null: false
t.string :description_jp, unique: true, null: false
t.integer :type, null: false
t.integer :position, null: false
t.string :form
t.integer :cooldown, default: 0, null: false
t.integer :lockout, default: 0, null: false
t.integer :duration, array: true
t.boolean :recast, default: false, null: false
t.integer :obtained_at, default: 1, null: false
t.uuid :effects, array: true
end
end
end

View file

@ -0,0 +1,18 @@
class CreateCharacterChargeAttacks < ActiveRecord::Migration[7.0]
def change
create_table :character_charge_attacks, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.references :character, type: :uuid
t.string :name_en, unique: true, null: false
t.string :name_jp, unique: true, null: false
t.string :description_en, unique: true, null: false
t.string :description_jp, unique: true, null: false
t.integer :order, null: false
t.string :form
t.uuid :effects, array: true
end
end
end

View file

@ -0,0 +1,21 @@
class CreateCharacterSupportSkills < ActiveRecord::Migration[7.0]
def change
create_table :character_support_skills, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.references :character, type: :uuid
t.string :name_en, unique: true, null: false
t.string :name_jp, unique: true, null: false
t.string :description_en, unique: true, null: false
t.string :description_jp, unique: true, null: false
t.integer :position, null: false
t.integer :obtained_at
t.boolean :emp, default: false, null: false
t.boolean :transcendence, default: false, null: false
t.uuid :effects, array: true
end
end
end

View file

@ -0,0 +1,5 @@
class AddQuickSummonToGridSummons < ActiveRecord::Migration[7.0]
def change
add_column :grid_summons, :quick_summon, :boolean, default: false, null: false
end
end

View file

@ -10,19 +10,62 @@
#
# 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_113538) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
enable_extension "pg_trgm"
enable_extension "pgcrypto"
enable_extension "plpgsql"
enable_extension "timescaledb"
create_table "app_updates", primary_key: "updated_at", id: :datetime, force: :cascade do |t|
t.string "update_type", null: false
t.string "version"
end
create_table "character_charge_attacks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "character_id"
t.string "name_en", null: false
t.string "name_jp", null: false
t.string "description_en", null: false
t.string "description_jp", null: false
t.integer "order", null: false
t.string "form"
t.uuid "effects", array: true
t.index ["character_id"], name: "index_character_charge_attacks_on_character_id"
end
create_table "character_skills", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "character_id"
t.string "name_en", null: false
t.string "name_jp", null: false
t.string "description_en", null: false
t.string "description_jp", null: false
t.integer "type", null: false
t.integer "position", null: false
t.string "form"
t.integer "cooldown", default: 0, null: false
t.integer "lockout", default: 0, null: false
t.integer "duration", array: true
t.boolean "recast", default: false, null: false
t.integer "obtained_at", default: 1, null: false
t.uuid "effects", array: true
t.index ["character_id"], name: "index_character_skills_on_character_id"
end
create_table "character_support_skills", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "character_id"
t.string "name_en", null: false
t.string "name_jp", null: false
t.string "description_en", null: false
t.string "description_jp", null: false
t.integer "position", null: false
t.integer "obtained_at"
t.boolean "emp", default: false, null: false
t.boolean "transcendence", default: false, null: false
t.uuid "effects", array: true
t.index ["character_id"], name: "index_character_support_skills_on_character_id"
end
create_table "characters", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "name_en"
t.string "name_jp"
@ -50,9 +93,28 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.integer "max_hp_ulb"
t.integer "max_atk_ulb"
t.integer "character_id", default: [], null: false, array: true
t.string "nicknames_en", default: [], null: false, array: true
t.string "nicknames_jp", default: [], null: false, array: true
t.index ["name_en"], name: "index_characters_on_name_en", opclass: :gin_trgm_ops, using: :gin
end
create_table "effects", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "name_en", null: false
t.string "name_jp", null: false
t.string "description_en", null: false
t.string "description_jp", null: false
t.integer "accuracy_value"
t.string "accuracy_suffix"
t.string "accuracy_comparator"
t.jsonb "strength", array: true
t.integer "healing_cap"
t.boolean "duration_indefinite", default: false, null: false
t.integer "duration_value"
t.string "duration_unit"
t.string "notes_en"
t.string "notes_jp"
end
create_table "favorites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.uuid "user_id"
t.uuid "party_id"
@ -77,6 +139,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.jsonb "ring4", default: {"modifier"=>nil, "strength"=>nil}, null: false
t.jsonb "earring", default: {"modifier"=>nil, "strength"=>nil}, null: false
t.jsonb "awakening", default: {"type"=>1, "level"=>1}, null: false
t.boolean "skill0_enabled", default: true, null: false
t.boolean "skill1_enabled", default: true, null: false
t.boolean "skill2_enabled", default: true, null: false
t.boolean "skill3_enabled", default: true, 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
@ -91,6 +157,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "transcendence_step", default: 0, null: false
t.boolean "quick_summon", default: false, null: false
t.index ["party_id"], name: "index_grid_summons_on_party_id"
t.index ["summon_id"], name: "index_grid_summons_on_summon_id"
end
@ -151,12 +218,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.integer "proficiency1"
t.integer "proficiency2"
t.string "row"
t.boolean "ml", default: false
t.boolean "master_level", default: false, null: false
t.integer "order"
t.uuid "base_job_id"
t.string "granblue_id"
t.boolean "accessory", default: false
t.integer "accessory_type", default: 0
t.boolean "ultimate_mastery", default: false, null: false
t.index ["base_job_id"], name: "index_jobs_on_base_job_id"
end
@ -210,7 +278,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.integer "element"
t.integer "weapons_count"
t.uuid "job_id"
t.integer "ml"
t.integer "master_level"
t.uuid "skill1_id"
t.uuid "skill2_id"
t.uuid "skill3_id"
@ -228,6 +296,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.integer "summons_count"
t.string "edit_key"
t.uuid "local_id"
t.integer "ultimate_mastery"
t.index ["accessory_id"], name: "index_parties_on_accessory_id"
t.index ["job_id"], name: "index_parties_on_job_id"
t.index ["skill0_id"], name: "index_parties_on_skill0_id"
@ -270,6 +339,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.boolean "xlb", default: false, null: false
t.integer "max_atk_xlb"
t.integer "max_hp_xlb"
t.string "nicknames_en", default: [], null: false, array: true
t.string "nicknames_jp", default: [], null: false, array: true
t.index ["name_en"], name: "index_summons_on_name_en", opclass: :gin_trgm_ops, using: :gin
end
@ -296,6 +367,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|
@ -323,6 +395,9 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_31_084343) do
t.boolean "awakening", default: true, null: false
t.boolean "limit", default: false, null: false
t.boolean "ax", default: false, null: false
t.integer "awakening_types", default: [], array: true
t.string "nicknames_en", default: [], null: false, array: true
t.string "nicknames_jp", default: [], null: false, array: true
t.index ["name_en"], name: "index_weapons_on_name_en", opclass: :gin_trgm_ops, using: :gin
end