Re: [sqlalchemy] session merge sets missing children foreign keys to null

2021-12-08 Thread Mike Bayer
On Wed, Dec 8, 2021, at 10:38 AM, Gabriel Smith wrote: > Hi, I'm a recent adopter of sqlalchemy, starting fresh with all the 2.0 > stuff. Thanks so much for the entire teams hard work! great! > > I have a small issue with the merge functionality and it could honestly just > be a

[sqlalchemy] session merge sets missing children foreign keys to null

2021-12-08 Thread Gabriel Smith
Hi, I'm a recent adopter of sqlalchemy, starting fresh with all the 2.0 stuff. Thanks so much for the entire teams hard work! I have a small issue with the merge functionality and it could honestly just be a misunderstanding of the function from my own point of view. I have a fairly

Re: [sqlalchemy] Re: How to add the index_elements to the on_conflict_do_update() method

2021-12-08 Thread Simon King
Does the table definition in postgres match your SQLAlchemy definition? Adding "unique=True" to the SQLAlchemy table definition will not automatically add an index to an existing table in the database. If you connect to the database using "psql" and run "\d message_symbol", does it show the