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. Automatically setup raw_id_fields ForeignKey & OneToOneField by agusmakmun 6 months, 2 weeks ago
  2. Crispy Form by sourabhsinha396 7 months, 1 week ago
  3. ReadOnlySelect by mkoistinen 7 months, 3 weeks ago
  4. Verify events sent to your webhook endpoints by santos22 8 months, 3 weeks ago
  5. Django Language Middleware by agusmakmun 9 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.