Partition Table creation in Postgres using SQLAlchemy ORM

Viewed 418

Use case : need to create a list partition with partition code

but makes error

Code:

class Products(Base):
    __tablename__ = 'products'
    name = Column('name', String)
    sku = Column('sku', String, primary_key = True)
    partition_code = Column('partition_code', Integer)
    description = Column('description', String)
    __table_args__ = {
        postgresql_partition_by: 'LIST (partition_code)'
    }
0 Answers
Related