zzorba / marvelsdb

MarvelsDB - a deck builders for Marvel Champions - The Card Game
49 stars 28 forks source link

Add star related boolean columns #221

Closed jordanweiler closed 3 months ago

jordanweiler commented 6 months ago

This is a breaking change in how we display card information related to special abilities.

I'm adding 9 new _star boolean columns to capture if there should be a star related to a specific card attribute. These columns just indicate whether a star should be displayed but it doesn't include the text for the special ability. I'm removing 4 _text string columns since we should just be using the text column directly for any card text to simplify things. The combination of using text and these new _star columns should allow us to display the correct text for each card and indicate whether the attack/thwart/etc has a special ability associated with it.

-- New columns added
ALTER TABLE card
  ADD attack_star TINYINT(1) DEFAULT NULL,
  ADD thwart_star TINYINT(1) DEFAULT NULL,
  ADD defense_star TINYINT(1) DEFAULT NULL,
  ADD health_star TINYINT(1) DEFAULT NULL,
  ADD recover_star TINYINT(1) DEFAULT NULL,
  ADD scheme_star TINYINT(1) DEFAULT NULL,
  ADD boost_star TINYINT(1) DEFAULT NULL,
  ADD threat_star TINYINT(1) DEFAULT NULL,
  ADD escalation_threat_star TINYINT(1) DEFAULT NULL;

-- Old columns deleted
ALTER TABLE card
  DROP boost_text,
  DROP real_boost_text,
  DROP scheme_text,
  DROP attack_text;

I'll be making additional PRs in the JSON repo to update cards to use these new _star columns and stop using the existing _text columns.

Other fixes:

Kamalisk commented 5 months ago

thanks for this! I will try to get this sorted before the end of the month.