Re: Does migrate --fake updates django_migrations?

2024-03-23 Thread Mike Dewhirst

On 23/03/2024 12:39 am, Jean-Baptiste Pressac wrote:

Hello,

The doc says about migrate --fake:

/Marks the migrations up to the target one (following the rules above) 
as applied, but without actually running the SQL to change your 
database schema. /


But what is the operations behind this "marks"? Modifications to the 
django_migrations database table?


What is the target migration? The most recent .py file in migrations 
folder?


The target for any migration operation (fake or otherwise) is any 
migration .py file in the migrations directory of the named app and 
which has not (yet) been listed in the Django migrations table.


Hth

Mike



Thank you,
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/265806f3-567d-43ae-8c19-f9b15a9ee741n%40googlegroups.com 
.



--
We recommend signal.org

Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Your
email software can handle signing.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ac4207fb-8e81-45b8-ba9b-0d3f139c%40dewhirst.com.au.


OpenPGP_signature.asc
Description: OpenPGP digital signature


Does migrate --fake updates django_migrations?

2024-03-22 Thread Jean-Baptiste Pressac
Hello,

The doc says about migrate --fake:

*Marks the migrations up to the target one (following the rules above) as 
applied, but without actually running the SQL to change your database 
schema. *

But what is the operations behind this "marks"? Modifications to the 
django_migrations database table?

What is the target migration? The most recent .py file in migrations folder?

Thank you,

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/265806f3-567d-43ae-8c19-f9b15a9ee741n%40googlegroups.com.