deckhearth/migrations/1787711511000_add-frame-textures-game-sharing.js
Randall Stillwell 5b9a278ca2 feat(designer): inline symbol icons, frame textures, community sharing, print sheets
- {CODE} tokens in description/actions/flavor render as inline symbol
  icons (RichText), including inside cost pips
- custom frames gain an optional background texture (upload/replace/
  remove via /api/custom-frames/[id]/texture); renders behind panels
- custom games can be shared to the community (is_public): toggle in the
  game space, public listing at /community/games, read-only game view,
  /api/public/games endpoints (no auth, public rows only)
- /designer/print: multi-card print sheets on US Letter at 300dpi
  (63x88mm cards, 3x3 or 2x2, dashed cut guides, full-sheet PNG export)
- migration 1787711511000
2026-08-24 21:48:52 -05:00

33 lines
809 B
JavaScript

/**
* Designer follow-ups:
* - custom_frames.texture_url: optional background texture image for
* custom frames (renders behind the card's panels).
* - custom_games.is_public: share a custom game space to the community
* section (read-only).
*/
export const up = (pgm) => {
pgm.sql(`
ALTER TABLE custom_frames
ADD COLUMN IF NOT EXISTS texture_url TEXT
`);
pgm.sql(`
ALTER TABLE custom_games
ADD COLUMN IF NOT EXISTS is_public BOOLEAN NOT NULL DEFAULT false
`);
pgm.sql(`
CREATE INDEX IF NOT EXISTS idx_custom_games_public
ON custom_games(is_public)
`);
};
export const down = (pgm) => {
pgm.sql(`
ALTER TABLE custom_games DROP COLUMN IF EXISTS is_public
`);
pgm.sql(`
ALTER TABLE custom_frames DROP COLUMN IF EXISTS texture_url
`);
};