This is a simple issue if you are familiar with SQLAlchemy, or a good chance to figure out how to use it and alembic if not.
Existing decks, cards, posts, and maybe stream all need to include an is_legacy boolean flag; these will be explicitly excluded from listings by default, and will probably be view-only going forward. These columns must be indexed.
[x] Add is_legacy to Deck, Card, Post, Release, and possibly Stream models; should default to False
[x] Modify Card.stub unique index to be unique based on both Card.stub and Card.is_legacy
[x] Generate migration with alembic revision --autogenerate -m "SHORT DESCRIPTION" (after running make shell). Add logic to migration to flip the flag to True for all existing content
[x] Test locally to ensure that flag is properly set in the database and defaults to False for new items
This is a simple issue if you are familiar with SQLAlchemy, or a good chance to figure out how to use it and alembic if not.
Existing decks, cards, posts, and maybe stream all need to include an
is_legacy
boolean flag; these will be explicitly excluded from listings by default, and will probably be view-only going forward. These columns must be indexed.is_legacy
to Deck, Card, Post, Release, and possibly Stream models; should default toFalse
Card.stub
unique index to be unique based on bothCard.stub
andCard.is_legacy
alembic revision --autogenerate -m "SHORT DESCRIPTION"
(after runningmake shell
). Add logic to migration to flip the flag toTrue
for all existing contentFalse
for new items