Skip to main content

Management command for fixing tables after model changes

Project description

Copyright (c) 2009-2012 Dennis Kaarsemaker <dennis@kaarsemaker.net>

Inspect your models and database and print Print SQL statements for changes in
models since the table was created/fixed. Supported changes are:

- ALTER TABLE to add/drop columns
- ALTER TABLE to change the length of VARCHAR fields
- ALTER TABLE to change default values
- CREATE INDEX for new ForeignKey and OneToOne fields
- CREATE TABLE for new m2m relations

Not (yet) supported:
- Databases other than MySQL (sqlite will never be supported, others can
possibly be supported, patches welcome)
- Changes in unique_together
- Field type changes (they will be detected and warned about though)
- Index additions/removals
- Deleting old m2m tables
- Parent changes in multi-table inheritance

If you need those, a complete migration framework like django-south is a
better option for you.

Install: python setup.py install
Usage:
- Add 'sqlfixtables' to INSTALLED_APPS
- Run: ./manage.py sqlfixtables <appname>

Compatible with django 1.0-1.4. Tested only on MySQL, bugreports or
testreports for other databases are welcome.

Project details


Release history Release notifications | RSS feed

This version

1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-sqlfixtables-1.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file django-sqlfixtables-1.2.tar.gz.

File metadata

File hashes

Hashes for django-sqlfixtables-1.2.tar.gz
Algorithm Hash digest
SHA256 a6a1b759d1c5315bcfb29cdd3b94dbb128fdb54e054b67ee1666aec30e885435
MD5 a626b917c4bdab3eee27e95f8a0dc616
BLAKE2b-256 d1c0bb396ec2431acd09e45975e1ea2cf632a0107e93ca6f8cb5e2345afb96b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page