1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
sqldiff
=======
:synopsis: Prints the ALTER TABLE statements for the given appnames.
Django command that scans all models for the given appnames and compares
their database schema with the real database tables.
It indicates how columns in the database are different from the SQL that would
be generated by Django. This command is not a database migration tool, though
it might certainly be of help during migrations. Its purpose is to show the
current differences as a way to check or debug your models compared to
the real database tables and columns.
Supported Databases
-------------------
Currently the following databases are supported:
* PostgreSQL
* Sqlite3
* MySQL
* Oracle
Patches to support other databases are welcome! :-)
Exit Codes
----------
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
Example Usage
-------------
::
# View SQL differences for all installed applications
$ ./manage.py sqldiff -a
::
# View SQL differences for all installed applications using text instead of SQL
$ ./manage.py sqldiff -a -t
|