Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/resources/card_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
end
attribute :card_set_names, :array_of_strings
attribute :designed_by, :string
attribute :narrative_text, :string
attribute :printings_released_by, :array_of_strings
attribute :pronouns, :string
attribute :pronunciation_approximation, :string
Expand Down
4 changes: 3 additions & 1 deletion app/resources/printing_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class PrintingResource < ApplicationResource # rubocop:disable Metrics/ClassLeng
end
attribute :card_set_names, :array_of_strings
attribute :designed_by, :string
attribute :narrative_text, :string
attribute :released_by, :string
attribute :printings_released_by, :array_of_strings
attribute :pronouns, :string
Expand Down Expand Up @@ -186,7 +187,8 @@ def images(id, face_index = nil)
'tiny' => "#{url_prefix}/tiny/#{id}#{face_suffix}.jpg",
'small' => "#{url_prefix}/small/#{id}#{face_suffix}.jpg",
'medium' => "#{url_prefix}/medium/#{id}#{face_suffix}.jpg",
'large' => "#{url_prefix}/large/#{id}#{face_suffix}.jpg"
'large' => "#{url_prefix}/large/#{id}#{face_suffix}.jpg",
'narrative' => "#{url_prefix}/large/#{id}#{face_suffix}-narrative.jpg"
}
}
end
Expand Down
7 changes: 7 additions & 0 deletions db/migrate/20250623035203_add_narrative_to_cards.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class AddNarrativeToCards < ActiveRecord::Migration[7.2] # rubocop:disable Style/Documentation
def change
add_column :cards, :narrative_text, :string
end
end
10 changes: 10 additions & 0 deletions db/migrate/20250623035759_update_unified_cards_to_version_10.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

class UpdateUnifiedCardsToVersion10 < ActiveRecord::Migration[7.2] # rubocop:disable Style/Documentation
def change
update_view :unified_cards,
version: 10,
revert_to_version: 9,
materialized: true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

class UpdateUnifiedPrintingsToVersion12 < ActiveRecord::Migration[7.2] # rubocop:disable Style/Documentation
def change
update_view :unified_printings,
version: 12,
revert_to_version: 11,
materialized: true
end
end
7 changes: 6 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2025_01_05_055917) do
ActiveRecord::Schema[7.2].define(version: 2025_06_23_035928) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
Expand Down Expand Up @@ -144,6 +144,7 @@
t.string "pronunciation_approximation"
t.string "pronunciation_ipa"
t.string "layout_id", default: "normal", null: false
t.string "narrative_text"
t.index ["card_type_id"], name: "index_cards_on_card_type_id"
t.index ["faction_id"], name: "index_cards_on_faction_id"
t.index ["side_id"], name: "index_cards_on_side_id"
Expand Down Expand Up @@ -594,6 +595,7 @@
c.influence_limit,
c.memory_cost,
c.minimum_deck_size,
c.narrative_text,
c.pronouns,
c.pronunciation_approximation,
c.pronunciation_ipa,
Expand Down Expand Up @@ -675,6 +677,7 @@
u.influence_limit,
u.memory_cost,
u.minimum_deck_size,
u.narrative_text,
u.pronouns,
u.pronunciation_approximation,
u.pronunciation_ipa,
Expand Down Expand Up @@ -913,6 +916,7 @@
c.link_provided,
c.memory_cost,
c.mu_provided,
c.narrative_text,
c.num_printed_subroutines,
c.on_encounter_effect,
c.performs_trace,
Expand Down Expand Up @@ -1011,6 +1015,7 @@
u.memory_cost,
u.mu_provided,
u.num_printed_subroutines,
u.narrative_text,
u.on_encounter_effect,
u.performs_trace,
u.pronouns,
Expand Down
Loading