all AI news
Running Python code as a migration operation in Django
Aug. 24, 2023, 3:18 p.m. | Jean-Michel Plourde
DEV Community dev.to
This blog post was originally published on: https://jmplourde.com/til-django-run-python-migration-operation/
When I started learning Django, I was confused with the difference between makemigrations
and migrate
commands. I got it after a while, but I never truly had to work with complex migrations or write custome ones. I recently had to write a custom migration to change a ForeignKey
field to a OneToOneField
and I used the RunSQL special operation which allows to run raw sql queries. It allowed me to better understand …
backend change database difference django migration python work
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Senior Machine Learning Engineer (MLOps)
@ Promaton | Remote, Europe
Associate Data Engineer
@ Nominet | Oxford/ Hybrid, GB
Data Science Senior Associate
@ JPMorgan Chase & Co. | Bengaluru, Karnataka, India