Employees and duties

Report a typo

The code below represents the connection between tables, where many employees can have many duties and vice versa, but the code is in a wrong order. Arrange it and add indents where necessary. Please consider using the example from the theory as a reference.

Use the arrows on the right to move lines and the buttons on the left to add indentation (one click equals four spaces).

Reorder lines using drag or arrows. Adjust indentation with left buttons
                name = Column(String)
              
                __tablename__ = "employee"
              
                Column("employee_id", Integer, ForeignKey("employee.id")),
              
                from sqlalchemy.ext.declarative import declarative_base
              
                name = Column(String)
              
                __tablename__ = "duty"
              
                )
              
                class Employee(Base):
              
                Base = declarative_base()
              
                id = Column(Integer, primary_key=True)
              
                Base.metadata,
              
                class Duty(Base):
              
                duties = relationship("Duty", secondary="EmployeeDuty")
              
                Column("duty_id", Integer, ForeignKey("duty.id")),
              
                id = Column(Integer, primary_key=True)
              
                "EmployeeDuty",
              
                association_table = Table(
              
___

Create a free account to access the full topic