Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
582b8362
Commit
582b8362
authored
Apr 13, 2011
by
Vassilios Karakoidas
Browse files
Added new section in README.deploy (Initial Migration)
parent
1a73c167
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.develop
View file @
582b8362
...
...
@@ -192,18 +192,35 @@ South Database Migrations
*Initial Migration
*Schema migrations:
First, remember to add the south app to settings.py (it is already included in the
settings.py.dist).
In addition, do not use the syncdb management command. It can only be used
the first time and/or if you drop the database and must recreate it from scratch.
To initialise south migrations in your database the following commands must be executed:
$ ./bin/python manage.py syncdb # Create / update the database with the south tables
$ ./bin/python manage.py migrate db # Perform migration in the database
Note that syncdb will create the latest models that exist in the db app, so some migrations may fail.
If you are sure a migration has already taken place you must use the "--fake" option, to apply it.
For example:
$ ./bin/python manage.py migrate db 0001 --fake
The first schema support for migrations is initialized with the following
command:
To be sure that all migrations are applied type:
$ ./bin/python schemamigration db --initial
$ ./bin/python manage.py migrate db --list
All starred migrations are applied.
Remember, the migration is performed mainly for the data, not for the database schema. If you do not want to migrate the
data, a syncdb and fake migrations for all the migration versions will suffice.
*Schema migrations:
Do not use the syncdb management command. It can only be used
the first time and/or if you drop the database and must recreate it from scratch.
See "Initial Migration" section.
Each time you make changes to the database and data migration is not required (WARNING: always
perform this with extreme care):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment