diff --git a/docs/setup.rst b/docs/setup.rst index f042356..dd5cb94 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -22,7 +22,7 @@ To use PostgreSQL, the following dependencies need to be installed (besides the .. code-block:: sh - pacman -S python-sqlalchemy python-psycopg2 + pacman -S python-psycopg2 Lilac can send error reports via email. A local mail transfer agent (MTA) is preferred (e.g. Postfix) but a remote one is supported too. We'll disable this in this article. diff --git a/lilac b/lilac index 084ddb7..f81b869 100755 --- a/lilac +++ b/lilac @@ -516,10 +516,8 @@ def main_may_raise( pkgbuild.update_data(PACMAN_DB_DIR, pacman_conf) if dburl := config['lilac'].get('dburl'): - import sqlalchemy - engine = sqlalchemy.create_engine(dburl) schema = config['lilac'].get('schema') - db.setup(engine, schema) + db.setup(dburl, schema) if cmds := config.get('misc', {}).get('prerun'): for cmd in cmds: diff --git a/scripts/testdb.py b/scripts/testdb.py deleted file mode 100755 index 7150ec5..0000000 --- a/scripts/testdb.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/python3 - -import sqlalchemy - -from lilac2 import db - -def main(): - engine = sqlalchemy.create_engine('postgresql:///') - db.setup(engine) - - with db.get_session() as s: - b = db.Batch(event='start') - s.add(b) - -if __name__ == '__main__': - main() -