feat: Add MTGJSON data loading and download scripts
- Fix MtgSet model to match database schema (removed created_at, added image column) - Create load_mtgjson_data.py script to load AllSetFiles, AllPrintings.psql, and other MTGJSON data - Create download_mtgjson_data.py script to download MTGJSON API data files - Add SPEC_synergy-mapping-engine.md documentation API endpoints are now working (200 OK) but database needs data loading via download_mtgjson_data.py then load_mtgjson_data.py
This commit is contained in:
@@ -26,7 +26,7 @@ class MtgSet(Base):
|
||||
icon_svg_url = Column(Text, nullable=True)
|
||||
parent_code = Column(String(10), nullable=True)
|
||||
mtgo_code = Column(String(10), nullable=True)
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
image = Column(Text, nullable=True) # Card image URL from MTGJSON
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
|
||||
# Relationships
|
||||
@@ -55,7 +55,7 @@ class MtgCard(Base):
|
||||
numbers = Column(String(100), nullable=True)
|
||||
identifiers = Column(Text, nullable=True) # JSON string
|
||||
images = Column(Text, nullable=True) # JSON string
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
image = Column(Text, nullable=True) # Card image URL from MTGJSON
|
||||
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
||||
|
||||
# Relationships
|
||||
|
||||
Reference in New Issue
Block a user