Skip to content

Commit

Permalink
test cascade
Browse files Browse the repository at this point in the history
  • Loading branch information
alexaorrico committed Nov 14, 2017
1 parent 805f0da commit 65b757a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions models/place.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
if models.storage_t == 'db':
place_amenity = Table('place_amenity', Base.metadata,
Column('place_id', String(60),
ForeignKey('places.id'), primary_key=True),
ForeignKey('places.id', onupdate= 'CASCADE',
ondelete='CASCADE'),
primary_key=True),
Column('amenity_id', String(60),
ForeignKey('amenities.id'), primary_key=True))
ForeignKey('amenities.id', onupdate= 'CASCADE',
ondelete='CASCADE'),
primary_key=True))


class Place(BaseModel, Base):
Expand Down

0 comments on commit 65b757a

Please sign in to comment.