Add quantity column to GuestGifts table and update references
Introduced a `quantity` field to track the number of reserved gifts in the many-to-many GuestGifts table. Updated all related CRUD operations, models, and imports to reflect the added column. Replaced `guest_gifts` with `GuestGifts` for consistency in naming conventions.
This commit is contained in:
@@ -317,6 +317,7 @@ def upgrade() -> None:
|
||||
sa.Column('gift_id', sa.UUID(), nullable=False),
|
||||
sa.Column('reserved_at', sa.DateTime(timezone=True), nullable=True),
|
||||
sa.Column('notes', sa.String(), nullable=True),
|
||||
sa.Column('quantity', sa.Integer(), nullable=False, server_default='1'),
|
||||
sa.ForeignKeyConstraint(['gift_id'], ['gift_items.id'], ondelete="CASCADE"),
|
||||
sa.ForeignKeyConstraint(['guest_id'], ['guests.id'], ondelete="CASCADE"),
|
||||
sa.PrimaryKeyConstraint('guest_id', 'gift_id')
|
||||
|
||||
Reference in New Issue
Block a user