The RCTA sqlalchemy working code