Merge branch 'staging' into awakening
This commit is contained in:
commit
9f218987b3
22 changed files with 148 additions and 0 deletions
|
|
@ -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
|
||||||
12
db/migrate/20230418052314_add_guidebooks.rb
Normal file
12
db/migrate/20230418052314_add_guidebooks.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
class AddGuidebooks < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
create_table :guidebooks, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.string :granblue_id, null: false, unique: true
|
||||||
|
t.string :name_en, null: false, unique: true
|
||||||
|
t.string :name_jp, null: false, unique: true
|
||||||
|
t.string :description_en, null: false
|
||||||
|
t.string :description_jp, null: false
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20230418052325_add_guidebooks_to_party.rb
Normal file
5
db/migrate/20230418052325_add_guidebooks_to_party.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddGuidebooksToParty < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :parties, :guidebooks, :uuid, array: true, default: [], null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
6
db/migrate/20230418061932_update_guidebooks_structure.rb
Normal file
6
db/migrate/20230418061932_update_guidebooks_structure.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
class UpdateGuidebooksStructure < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
remove_column :guidebooks, :updated_at
|
||||||
|
change_column_default :guidebooks, :created_at, -> { 'CURRENT_TIMESTAMP' }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RenameGuidebooksToGuidebookIDs < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
rename_column :parties, :guidebooks, :guidebook_ids
|
||||||
|
end
|
||||||
|
end
|
||||||
8
db/migrate/20230419033648_split_guidebooks_on_party.rb
Normal file
8
db/migrate/20230419033648_split_guidebooks_on_party.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
class SplitGuidebooksOnParty < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
remove_column :parties, :guidebook_ids
|
||||||
|
add_reference :parties, :guidebook0, type: :uuid, foreign_key: { to_table: :guidebooks }
|
||||||
|
add_reference :parties, :guidebook1, type: :uuid, foreign_key: { to_table: :guidebooks }
|
||||||
|
add_reference :parties, :guidebook2, type: :uuid, foreign_key: { to_table: :guidebooks }
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20230419102354_rename_guidebook_columns.rb
Normal file
5
db/migrate/20230419102354_rename_guidebook_columns.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RenameGuidebookColumns < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
rename_column :parties, :guidebook0_id, :guidebook3_id
|
||||||
|
end
|
||||||
|
end
|
||||||
13
db/migrate/20230423070004_add_gacha_table.rb
Normal file
13
db/migrate/20230423070004_add_gacha_table.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
class AddGachaTable < ActiveRecord::Migration[7.0]
|
||||||
|
create_table :gacha, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.references :drawable, polymorphic: true
|
||||||
|
t.boolean :premium
|
||||||
|
t.boolean :classic
|
||||||
|
t.boolean :flash
|
||||||
|
t.boolean :legend
|
||||||
|
t.boolean :valentines
|
||||||
|
t.boolean :summer
|
||||||
|
t.boolean :halloween
|
||||||
|
t.boolean :holiday
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20230423071446_add_recruits_to_weapon.rb
Normal file
5
db/migrate/20230423071446_add_recruits_to_weapon.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddRecruitsToWeapon < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_reference :weapons, :recruits, null: true, to_table: 'character_id', type: :uuid
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
class ChangeGachaDrawableIdToUuid < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
remove_column :gacha, :drawable_id, :bigint
|
||||||
|
remove_column :gacha, :drawable_type, :string
|
||||||
|
add_reference :gacha, :drawable, polymorphic: true, type: :uuid
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class MakeGachaDrawableIdUnique < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_index :gacha, :drawable_id, unique: true
|
||||||
|
end
|
||||||
|
end
|
||||||
8
db/migrate/20230502012823_add_gacha_rateups_table.rb
Normal file
8
db/migrate/20230502012823_add_gacha_rateups_table.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
class AddGachaRateupsTable < ActiveRecord::Migration[7.0]
|
||||||
|
create_table :gacha_rateups, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.references :gacha, type: :uuid
|
||||||
|
t.string :user_id
|
||||||
|
t.numeric :rate
|
||||||
|
t.datetime :created_at, null: false, default: -> { 'CURRENT_TIMESTAMP' }
|
||||||
|
end
|
||||||
|
end
|
||||||
11
db/migrate/20230503221903_add_sparks_table.rb
Normal file
11
db/migrate/20230503221903_add_sparks_table.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
class AddSparksTable < ActiveRecord::Migration[7.0]
|
||||||
|
create_table :sparks, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.string :user_id, null: false
|
||||||
|
t.string :guild_ids, array: true, null: false
|
||||||
|
t.integer :crystals, default: 0
|
||||||
|
t.integer :tickets, default: 0
|
||||||
|
t.integer :ten_tickets, default: 0
|
||||||
|
t.references :target, polymorphic: true
|
||||||
|
t.datetime :updated_at, null: false, default: -> { 'CURRENT_TIMESTAMP' }
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20230503224345_add_target_memo_to_sparks.rb
Normal file
5
db/migrate/20230503224345_add_target_memo_to_sparks.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddTargetMemoToSparks < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :sparks, :target_memo, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class MakeUserIdUniqueInSparks < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_index :sparks, :user_id, unique: true
|
||||||
|
end
|
||||||
|
end
|
||||||
16
db/migrate/20230529210259_add_raid_groups_table.rb
Normal file
16
db/migrate/20230529210259_add_raid_groups_table.rb
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
class AddRaidGroupsTable < ActiveRecord::Migration[7.0]
|
||||||
|
def up
|
||||||
|
create_table :raid_groups, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||||
|
t.string :name_en, null: false
|
||||||
|
t.string :name_jp, null: false
|
||||||
|
t.integer :difficulty
|
||||||
|
t.integer :order, null: false
|
||||||
|
t.integer :section, default: 1, null: false
|
||||||
|
t.boolean :extra, default: false, null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
drop_table :raid_groups
|
||||||
|
end
|
||||||
|
end
|
||||||
6
db/migrate/20230529215259_add_raid_group_to_raids.rb
Normal file
6
db/migrate/20230529215259_add_raid_group_to_raids.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
class AddRaidGroupToRaids < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_reference :raids, :group, null: true, to_table: 'raid_groups', type: :uuid
|
||||||
|
add_foreign_key :raids, :raid_groups, column: :group_id
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20230530000739_add_hl_to_raid_groups.rb
Normal file
5
db/migrate/20230530000739_add_hl_to_raid_groups.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddHlToRaidGroups < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :raid_groups, :hl, :boolean, default: true, null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveGroupIntegerFromRaids < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
remove_column :raids, :group, :integer
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddGuidebooksToRaidGroups < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :raid_groups, :guidebooks, :boolean, default: false, null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20230618051638_add_auto_summon_to_parties.rb
Normal file
5
db/migrate/20230618051638_add_auto_summon_to_parties.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddAutoSummonToParties < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :parties, :auto_summon, :boolean, default: false, null: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
|
|
||||||
ActiveRecord::Schema[7.0].define(version: 2023_06_19_045651) do
|
ActiveRecord::Schema[7.0].define(version: 2023_06_19_045651) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "btree_gin"
|
enable_extension "btree_gin"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue