Add boss seed data pipeline for export and import
Add seeder support for boss battles so new database instances come pre-populated. Adds --export-bosses CLI flag to dump boss data from the database to JSON seed files, and loads those files during normal seeding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from sqlalchemy import ForeignKey, SmallInteger, String
|
||||
from sqlalchemy import ForeignKey, SmallInteger, String, UniqueConstraint
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
from app.core.database import Base
|
||||
@@ -6,6 +6,9 @@ from app.core.database import Base
|
||||
|
||||
class BossBattle(Base):
|
||||
__tablename__ = "boss_battles"
|
||||
__table_args__ = (
|
||||
UniqueConstraint("version_group_id", "order", name="uq_boss_battles_version_group_order"),
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
version_group_id: Mapped[int] = mapped_column(
|
||||
|
||||
Reference in New Issue
Block a user