diff --git a/core/data/alembic/versions/63f1fc2e334c_drop_billing_playcount_unique_constraint.py b/core/data/alembic/versions/63f1fc2e334c_drop_billing_playcount_unique_constraint.py new file mode 100644 index 0000000..fda1a6f --- /dev/null +++ b/core/data/alembic/versions/63f1fc2e334c_drop_billing_playcount_unique_constraint.py @@ -0,0 +1,24 @@ +"""drop billing playcount unique constraint + +Revision ID: 63f1fc2e334c +Revises: ada3e2d02483 +Create Date: 2026-07-03 18:01:52.160242 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '63f1fc2e334c' +down_revision = 'ada3e2d02483' +branch_labels = None +depends_on = None + + +def upgrade(): + op.drop_constraint('machine', 'machine_billing_playcount', type_='unique') + + +def downgrade(): + op.create_unique_constraint('machine', 'machine_billing_playcount', ['machine']) diff --git a/core/data/schema/arcade.py b/core/data/schema/arcade.py index d587f71..f10f4cc 100644 --- a/core/data/schema/arcade.py +++ b/core/data/schema/arcade.py @@ -142,7 +142,7 @@ billing_playct: Table = Table( "machine", Integer, ForeignKey("machine.id", ondelete="cascade", onupdate="cascade"), - nullable=False, unique=True + nullable=False ), Column("game_id", CHAR(5), nullable=False), Column("year", INTEGER, nullable=False),