Open RRaideRR opened 5 years ago
I found something similar with 2.1.0.0 when doing migrations. My migration had several steps, a later one failed and instead of rolling all steps back, the previous steps were still applied. An output of the SQL produced something like this:
BEGIN TRANSACTION **alter table steps COMMIT;
Running the same SQL directly in management studio produced the same failed step as via migrate, however all the previous steps were rolled back as expected.
depending upon name of connections dictionary in settings.py try like this:
with transaction.atomic(using='azure_reporting'):
MyModel.objects.filter(id=1).update(my_field='Test')
time.sleep(20)
I use
django-pyodbc-azure
2.1.0.0 for the connection with an Azure SQL database which works fine.When I understand the documentation of
django-pyodbc-azure
correctly, transactions should be supported.However, this code immediately updates the row. I would expect, that the row is updated after 20 seconds.
Am I doing something wrong? Do I need to specifiy certain settings on the Azure SQL database?
My current settings.py