Re: [sqlalchemy] Approval of changes to records

2018-07-15 Thread 'Kirk Holland' via sqlalchemy
On 14 July 2018 at 19:45, Marc wrote: The application has the requirement that authorised users can add > information to the database, but this information should not be displayed > on the public web pages until an admin has approved it. Currently there is > no need to hold a history of changes,

Fwd: [sqlalchemy] history_meta.py IntegrityError: (IntegrityError) duplicate key value violates unique constraint p2docs_history_pkey

2014-12-04 Thread kirk holland
Hi, We were having a similar problem with history_meta, so we created history_meta_date (.py file attached). In our version, we use timestamps rather than sequence numbers to track history versions and don't need to worry about duplicate key problems. The version_date timestamps still provide

[sqlalchemy] Fwd: Query produced by SA runs in Postgres, but error in SA

2012-03-07 Thread Kirk Holland
Hi there, I have code that does this: Session.query(Region). \ filter(Region.deleted==False). \ filter(Region.region_id.in_(from_statement_query)) Where from_statement_query is explicit SQL that returns only a region id. The SQL that is produced by this code looks like: SELECT

Re: [sqlalchemy] Fwd: Query produced by SA runs in Postgres, but error in SA

2012-03-07 Thread Kirk Holland
, Michael Bayer mike...@zzzcomputing.com wrote: On Mar 7, 2012, at 10:39 AM, Kirk Holland wrote: Hi there, I have code that does this: Session.query(Region). \ filter(Region.deleted==False). \ filter(Region.region_id.in_(from_statement_query)) Where from_statement_query is explicit SQL