[sqlalchemy] postgresql geometry types

2020-07-08 Thread Роберт Шотланд
We are beginning to use the PostgreSQL (12) geometric types (initially the 'point' datatype) in our SA model, and was disappointed to find that the sqlalchemy postgresql dialect modules appear not to have these. So I wrote a function using schema.CreateColumn to generate the postgresql DDL

[sqlalchemy] Converting existing table to PG11 partitioned table in SA

2019-03-18 Thread Роберт Шотланд
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

[sqlalchemy] Re: Preventing deletion based on row context

2017-02-13 Thread Роберт Шотланд
tion into an alembic migration module? (sorry, probably off-topic) On Thursday, February 9, 2017 at 12:19:26 PM UTC-7, Роберт Шотланд wrote: > > I have a table 'item' that contains a nullable 'reg_number' field that, if > it contains a non-null value, the row must not be deleted. I would normal

[sqlalchemy] Preventing deletion based on row context

2017-02-09 Thread Роберт Шотланд
I have a table 'item' that contains a nullable 'reg_number' field that, if it contains a non-null value, the row must not be deleted. I would normally implement a SQL delete-trigger to do this, except we would prefer to maintain a pure SQLAlchemy environment.What would be the best way of

[sqlalchemy] Re: Using alembic_version to verify compatible version of declaratives

2017-01-10 Thread Роберт Шотланд
0.3*. On Tuesday, January 10, 2017 at 1:02:43 PM UTC-7, Роберт Шотланд wrote: > > We have a project in active development that will have periodic alembic > migrations driven by an evolving declarative package. We are looking for a > means of automatically checking (say, at bind-=engi

[sqlalchemy] Using alembic_version to verify compatible version of declaratives

2017-01-10 Thread Роберт Шотланд
We have a project in active development that will have periodic alembic migrations driven by an evolving declarative package. We are looking for a means of automatically checking (say, at bind-=engine time?) a list of obsolete alembic revision ids (embedded in our declarative package), that