Skip to content

Commit 47db473

Browse files
committed
Removed the restrictions_cards_global_penalty.value field properly
1 parent 6118d67 commit 47db473

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class RemoveValueFromRestrictionsCardsGlobalPenalty < ActiveRecord::Migration[7.0]
2+
def change
3+
remove_column :restrictions_cards_global_penalty, :value
4+
end
5+
end

db/schema.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.0].define(version: 2022_09_25_113944) do
13+
ActiveRecord::Schema[7.0].define(version: 2022_09_25_225117) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

@@ -300,6 +300,10 @@
300300
ELSE false
301301
END AS is_restricted,
302302
COALESCE(restrictions_cards_points.value, 0) AS eternal_points,
303+
CASE
304+
WHEN (restrictions_cards_global_penalty.restriction_id IS NOT NULL) THEN true
305+
ELSE false
306+
END AS has_global_penalty,
303307
COALESCE(restrictions_cards_universal_faction_cost.value, 0) AS universal_faction_cost
304308
FROM ((((((cards_cross_restrictions_and_snapshots
305309
JOIN card_pools_cards ON (((card_pools_cards.card_pool_id = cards_cross_restrictions_and_snapshots.card_pool_id) AND (card_pools_cards.card_id = (cards_cross_restrictions_and_snapshots.card_id)::text))))

0 commit comments

Comments
 (0)