Login

Manage.py alterdb command

Author:
certator
Posted:
July 18, 2012
Language:
Python
Version:
1.3
Tags:
hack table syncdb alter
Score:
-2 (after 2 ratings)

added commands:

altersql - shows sql code with alter queries

alterdb - apply alter queries. parameters:

--showsql - show queries

--app=APPLICATION - alter only selected application

you need clone this repo

1
2
3
4
5
6
7
# add django_snippets to INSTALLED_APPS

# usage example
# ./manage.py altersql myapp
# ./manage.py alterdb
# ./manage.py alterdb --app=myapp
# ./manage.py alterdb --showsql

More like this

  1. print SQL statements by zuzelvp 5 years, 3 months ago
  2. Alter Column Lengths of Contrib Apps by guettli 7 years, 1 month ago
  3. Link Media Command by elwaywitvac 6 years, 8 months ago
  4. PyCrust Shell by robvdl 7 years, 7 months ago
  5. UnitTesting without create/destroy database by crucialfelix 6 years, 3 months ago

Comments

ckarrie2 (on July 18, 2012):

So where is this django_snippets module?

#

jezdez (on July 19, 2012):

It's linked in the description. That said, this is a pretty weak snippet.

#

Please login first before commenting.