In django, we can write '__first__' to specify the first migration dependency
dependencies = [
('auth', '__first__'),
]
Is there a way to get the last?
Something like '__last__' ?
Thanks
Reverting a Migration But, for some reason, you want to revert the database to the previous state. In this case, use the update-database <migration name> command to revert the database to the specified previous migration snapshot.
The EF command-line tools can be used to apply migrations to a database. While productive for local development and testing of migrations, this approach isn't ideal for managing production databases: The SQL commands are applied directly by the tool, without giving the developer a chance to inspect or modify them.
Yes, there is.
It's name is __latest__
.
Example:
dependencies = [
('auth', '__latest__'),
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With