Changes between Version 61 and Version 62 of SchemaEvolution
- Timestamp:
- Jan 10, 2011, 1:48:09 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SchemaEvolution
v61 v62 256 256 * ``django-admin syncdb`` applies evolutions using the following steps: 257 257 258 #. Makes sure evolution is installed before proceeding.258 1. Makes sure evolution is installed before proceeding. 259 259 260 #. For each content type, checks that the version in the database matches260 2. For each content type, checks that the version in the database matches 261 261 the version in defined in the model. For those that don't match... 262 262 263 #. Django looks for evolutions in ``<app_package>/upgrade/``. Evolutions263 3. Django looks for evolutions in ``<app_package>/upgrade/``. Evolutions 264 264 can either be SQL scripts named ``to_version_X.sql`` or Python scripts 265 265 named ``to_version_X.py``. 266 266 267 #. ``django.contrib.evolution`` will contain utilities to abstract evolution267 4. ``django.contrib.evolution`` will contain utilities to abstract evolution 268 268 for different db backends. This exact API is TBD. 269 269 270 #. For SQL evolutions, if a file named ``to_version_X.out`` exists, ``syncdb``270 5. For SQL evolutions, if a file named ``to_version_X.out`` exists, ``syncdb`` 271 271 will expect the output of the evolution to match the text file EXACTLY. If 272 272 any differences happen, the transaction will be rolled back (for that reason