Refactor card_stats migration to add power, charm, and wit columns to the card table

This commit is contained in:
w 2025-06-22 01:14:32 -03:00
parent e1e6808b0a
commit 7b75a7eea9

View file

@ -16,9 +16,11 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see https://www.gnu.org/licenses/. along with this program. If not, see https://www.gnu.org/licenses/.
*/ */
CREATE TABLE IF NOT EXISTS card_stats ( ALTER TABLE card
card_id INTEGER PRIMARY KEY, ADD COLUMN power INTEGER NOT NULL DEFAULT (abs(random() % 9999));
power INTEGER NOT NULL DEFAULT abs(random() % 9999),
charm INTEGER NOT NULL DEFAULT abs(random() % 9999),, ALTER TABLE card
FOREIGN KEY(card_id) REFERENCES card(id) ADD COLUMN charm INTEGER NOT NULL DEFAULT (abs(random() % 9999));
)
ALTER TABLE card
ADD COLUMN wit INTEGER NOT NULL DEFAULT (abs(random() % 9999));