You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried both purely the example from the docs, and this example which I would imagine should just work.
Any idea what could be wrong?
import sqlalchemy as sa
import sqlalchemy.orm as orm
import temporal_sqlalchemy as temporal
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
sessionmaker = orm.sessionmaker()
session = sessionmaker()
temporal.temporal_session(session)
# postgres 11 from docker
connection_string = "postgresql://postgres:[email protected]:5432/test"
engine = create_engine(connection_string, echo=True)
Base = declarative_base()
class MyModel(Base, temporal.TemporalModel):
__tablename__ = 'my_model_table'
__table_args__ = {'schema': 'my_schema'}
id = sa.Column(sa.BigInteger, primary_key=True)
description = sa.Column(sa.Text)
class Temporal:
track = ('description', )
# It crashes here with
# AttributeError: type object 'Temporal' has no attribute 'activity_class'
Base.metadata.create_all(engine)
m = MyModel()
session.add(m)
session.commit()
The text was updated successfully, but these errors were encountered:
I tried both purely the example from the docs, and this example which I would imagine should just work.
Any idea what could be wrong?
The text was updated successfully, but these errors were encountered: