We have a an existing PostgreSQL 9.6 database that we would like to upgrade 
to PostgreSQL 11 mostly for the purpose of partitioning a large (soon to be 
huge) table using PostgreSQL Declarative Partitioning. Our database has 
been implemented with declarative SA ORM with migrations managed by 
Alembic. The table (simplified for posting)  looks like this:

class Ep(db.Model):
    __tablename__ = 'ep'

    id = Column(BigInteger, Sequence('id_ep_seq'), primary_key=True)
    ep_date = Column(DateTime, nullable=False)
    r = Column(Float, nullable=False)
    d = Column(Float, nullable=False)
    m = Column(Float)


We intend to partition by ranges of ep_date (by day). As yet we have not 
found any examples or how-to's on how to proceed, i.e. modifying the model 
and ORM code to implement the PARTITION BY RANGE() postgresql dialect 
statements.

We notice that there is a python package *architect *that apparently can 
(with decorator functions) help with this, but its documentation appears 
very limited at present.

Guidance or examples from anybody with insight on this issue would be 
appreciated.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to