Column('mirror', String, nullable=False))
machine_access_table = Table('machine_access', meta,
- Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=False, index=True),
+ Column('machine_id', Integer, ForeignKey('machines.machine_id', ondelete='CASCADE'), nullable=False, index=True),
Column('user', String, nullable=False, index=True),
- PrimaryKeyConstraint('machine_id', 'user', ondelete='CASCADE'))
+ PrimaryKeyConstraint('machine_id', 'user'))
class Machine(object):
def __repr__(self):