Closed riseriyo closed 9 years ago
Post this migration file as an example and then state:
"The reader can learn more about migrations and migration files by reading the online Django documentation at: https://docs.djangoproject.com/en/1.7/topics/migrations/ "
Since we have a section dedicated to migrations, I just provided the commands to move forward and left that for later. You can look at the way I explained it here:
Do you think that's adequate?
@macro1 @riseriyo I added some wording for user friendliness. 515876202ca0e3e97d2f69a6d4a4de92cb1158da
If you agree with the changes, let's close this :)
Looks good to me.
Wording is fine. Thnx.
On Sun, Nov 9, 2014 at 8:06 AM, Micah Denbraver notifications@github.com wrote:
Looks good to me.
— Reply to this email directly or view it on GitHub https://github.com/pythonsd/test-driven-django-development/issues/144#issuecomment-62308243 .
Ms. Rise Riyo
“Named must your fear be before banish it you can.” - Yoda
When asking the reader the following, there are some changes due to migrations being supported in Django 1.7. See https://docs.djangoproject.com/en/dev/topics/migrations/#upgrading-from-south
Under this section:0 To create the database table for our Entry model we need to run syncdb again: python manage.py syncdb
We now get: $ python manage.py syncdb Operations to perform: Apply all migrations: admin, contenttypes, auth, sessions Running migrations: No migrations to apply. Your models have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Add the following: $ python manage.py makemigrations Migrations for 'blog': 0001_initial.py:
The file 0001_initial.py will be added to the directory, blog/migrations, and will reflect the changes made to the database schema. In our case, we've added a model, Entry to this schema. The reader can learn more about migrations and migration files by reading the online Django documentation at: https://docs.djangoproject.com/en/1.7/topics/migrations/