[PATCH] migrate the database schema to SQLAlchemy

Lukas Fleischer lfleischer at archlinux.org
Thu Feb 20 18:11:37 UTC 2020


On Sun, 16 Feb 2020 at 21:56:10, Frédéric Mangano-Tarumi wrote:
> The new schema was generated with sqlacodegen and then manually adjusted
> to fit schema/aur-schema.sql faithfully, both in the organisation of the
> code and in the SQL generated by SQLAlchemy.
> 
> Initializing the database now requires the new tool aurweb.initdb.
> References to aur-schema.sql have been updated and the old schema
> dropped.
> ---
>  INSTALL                |  12 +-
>  TESTING                |  23 +--
>  aurweb/db.py           |  27 +++
>  aurweb/initdb.py       |  47 +++++
>  aurweb/schema.py       | 387 ++++++++++++++++++++++++++++++++++++++
>  schema/Makefile        |  12 --
>  schema/aur-schema.sql  | 415 -----------------------------------------
>  schema/reloadtestdb.sh |  29 ---
>  test/Makefile          |   6 +-
>  test/setup.sh          |   5 +-
>  10 files changed, 481 insertions(+), 482 deletions(-)
>  create mode 100644 aurweb/initdb.py
>  create mode 100644 aurweb/schema.py
>  delete mode 100644 schema/Makefile
>  delete mode 100644 schema/aur-schema.sql
>  delete mode 100755 schema/reloadtestdb.sh

Thanks a lot for the work and sorry for the late reply! I had a closer
look at the patch today and I really like the implementation.

I capitalized the first letter of the commit message but don't have any
other comments on the patch itself. It is sitting in the pu branch now.


More information about the aur-dev mailing list