[sqlalchemy] Explicitly name the not null constraint for an Oracle primary key

2015-12-04 Thread Thijs Engels
Dear all, For maintenance purposes I have aiming to ensure that ALL database constraint have an explicit name (as recommended here as well: http://alembic.readthedocs.org/en/latest/naming.html) With the NOT NULL constraints this can be done by adding an explicit CheckConstraint. However at least

RE: [sqlalchemy] Explicitly name the not null constraint for an Oracle primary key

2015-12-04 Thread Gombas, Gabor
Hi, We solved this a long time ago using an extra function, which gets called after SQLAlchemy did its part. The function queries all constraints, and renames the ones which look like NOT NULL constraints having a name starting with SYS_. This method works well in practice, and since we have

Re: [sqlalchemy] Explicitly name the not null constraint for an Oracle primary key

2015-12-04 Thread Mike Bayer
On 12/04/2015 07:25 AM, Thijs Engels wrote: > Dear all, > > For maintenance purposes I have aiming to ensure that ALL database > constraint have an explicit name (as recommended here as well: > http://alembic.readthedocs.org/en/latest/naming.html) > > With the NOT NULL constraints this can be