Re: [sqlalchemy] Supporting Function Indexes on a Minimum Sqlite Version

2021-03-09 Thread 'Jonathan Vanasco' via sqlalchemy
Thank you so much, Mike! I roughly had that same @compiles in my tests, but I didn't trust myself... and the .dbapi looked like what I wanted, but I really wasn't sure! On Monday, March 8, 2021 at 4:36:03 PM UTC-5 Mike Bayer wrote: > > > On Mon, Mar 8, 2021, at 12:06 PM, 'Jonathan Vanasco' via

Re: [sqlalchemy] can you insert data for a model with a many to many relationship using alembic?

2021-03-09 Thread Mike Bayer
bulk_insert_mappings doesn't handle relationships in any case, if you wanted relationships to be persisted without doing the INSERT yourself you would need to use regular ORM Session unit of work patterns. In Alembic, you would need to use ORM mappings inside of your alembic scripts, which is

[sqlalchemy] can you insert data for a model with a many to many relationship using alembic?

2021-03-09 Thread maqui...@gmail.com
I'm trying to create an alembic bulk insert statement to add a row into a model that has a relationship (many-to-many) with another table but don't know if this is possible or if so what syntax to use. In my current alembic file I do this in two or more steps: 1.) I add the rows to the table rep

Re: [sqlalchemy] Exception on '.refresh' for certain objects - state.load_path Tuple is empty

2021-03-09 Thread Mike Bayer
still kind of weird, I am not seeing any issue like this that was fixed, wouldn't mind seeing a reproducer case but no worries. On Mon, Mar 8, 2021, at 6:44 PM, Gmoney wrote: > Looks like that did the trick! Should have tried that first, but got lazy > when conda was resisting my update attemp