Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

could not assemble any primary key columns for mapped table sqlalchemy

1. Make sure all your tables have a primary key and you set the __table__ = 'name'
2. execute the following underneath declared table models
with Session(engine) as session:
        Base.metadata.create_all(engine)
        session.commit()
 
PREVIOUS NEXT
Tagged: #assemble #primary #key #columns #mapped #table #sqlalchemy
ADD COMMENT
Topic
Name
9+1 =