skip to Main Content

Postgresql – Entity to support multiple dialects

I have an SQLAlchemy entity written for PostgreSQL dialect and it uses server_default=func.clock_timestamp(): row_created = sa.Column('row_created_', sa.DateTime(timezone=True), server_default=func.clock_timestamp(), nullable=False) I also need to use it with SQLite, which throws an error: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unknown function: clock_timestamp() How do I make…

VIEW QUESTION
Back To Top
Search