[sqlalchemy] Re: low-level commands in 2.0

2022-11-24 Thread zsol...@gmail.com
] {} CREATE DATABASE md_server [raw sql] {} ROLLBACK using DBAPI connection.rollback(), DBAPI should ignore due to autocommit mode On Thursday, 24 November 2022 at 21:24:11 UTC+1 zsol...@gmail.com wrote: > Hi, > > I'm trying to run low-level commands like DROP DATABASE / CREATE

[sqlalchemy] low-level commands in 2.0

2022-11-24 Thread zsol...@gmail.com
Hi, I'm trying to run low-level commands like DROP DATABASE / CREATE DATABASE, with psycopg2. In 1.3 I used the following: with pg_engine.connect().execution_options(isolation_level="AUTOCOMMIT",autocommit=True) as conn: conn.execute(command) Now in 2.0 I run into many errors. I've

[sqlalchemy] Configuring Alembic in SQL-only mode

2021-08-21 Thread zsol...@gmail.com
Hi, I'm using SQLAlchemy 1.3 with PostgreSQL. I'm trying to use alembic in SQL-only mode. I'm using a custom sql-diff script which takes the pg_dump's --schema output and compares it with a clean db setup's one and tells me exactly what changes do I need to make. This way I catch 100% of the

Re: [sqlalchemy] How to disable the integer col + pk = serial behaviour?

2020-08-05 Thread zsol...@gmail.com
Thanks for all the answers. > add autoincrement=False to the Column This is actually all I needed, but possibly my findings can help others or provide improvements. I'm not using drop_alll and create_all, but table.create() and this results in the "relation "some_seq" already exists" error.