Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed database update instructions #2116

Merged
merged 1 commit into from
Nov 24, 2014
Merged

Fixed database update instructions #2116

merged 1 commit into from
Nov 24, 2014

Conversation

LuRsT
Copy link
Contributor

@LuRsT LuRsT commented Nov 24, 2014

As per our discussion here: #2102

@@ -44,7 +44,9 @@ When that's all done we'll need to update our database tables.
Normally we'd create a database migration in order to do that, but for the purposes of this tutorial, let's just delete the database and start again.

rm tmp.db
python manage.py syncdb
rm -r snippets/migrations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be mkdirinstead of rm ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The directory is already created from previous instructions, we just need to recreate them, that's why the instructions are to remove the migrations and then re-run them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, missed that point.
We should probably add a note that this isn't a good practice (something such as for the sake of simplicity we do it but don't do that at home). Tutorials are often referred to and I'm not happy with removing the database and migrations to recreate both.
I'm ok for the only reason that doing it the right way will introduce more complexity (default value for the fields).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the line above the snippet already makes that point. When I did the tutorial, I had the idea that this was not a best practice.

tomchristie added a commit that referenced this pull request Nov 24, 2014
Fixed database update instructions
@tomchristie tomchristie merged commit 3371131 into encode:master Nov 24, 2014
@tomchristie
Copy link
Member

Ta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants