Created
November 11, 2013 21:34
-
-
Save OrangeTux/7420803 to your computer and use it in GitHub Desktop.
Simplified problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#project.py | |
if __name__ == '__main__': | |
from project.model import Base, Log | |
from project.db import engine | |
Base.metadata.create_all(engine) # Log shows me that table has been created. | |
# models.py | |
# .. imports and stuf | |
Base = declarative_base() | |
class Log(Base): | |
__tablename__ = 'log' | |
# column definitions etc | |
# some_script.py | |
log = Log() | |
Session.add(log) | |
Session.commit() # Will fail, 'no such table' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment