-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdjango-south
45 lines (34 loc) · 998 Bytes
/
django-south
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
Using south
-----------------
Django shell
------------
cd src
source ../bin/activate
export PYTHONPATH=$PYTHONPATH:$PWD:$PWD/apps
django-admin.py shell --settings=settings.dev
Converting existing project to south
--------------------------------------------
install south
add south to installed_apps
./manage.py syncdb
./manage.py migrate
Using south for an app
------------------------------
First time
./manage.py schemamigration southtut --initial
./manage.py migrate southtut
After making changes to model
./manage.py schemamigration southtut --auto
./manage.py migrate southtut
with django-admin.py
----------------------------
source ../../bin/activate (if not in virtualenv)
export PYTHONPATH=$PYTHONPATH:$PWD:$PWD/apps
django-admin.py …… --settings=settings.dev
Checking out a new project with South migration
---------------------------------------------
./manage.py syncdb
./manage.py migrate
Deploying changes with South
-----------------------------
./manage.py migrate