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
Suggestion of improvement for the getting started guide #43475
Comments
|
Thanks for the feedback. Maybe it’s better to give the new status column a default, and backfill the data all in one migration. Anyway, would you like to make a PR to update the guide? |
|
Ok to make a PR on that, but I'm unsure of when I'll have time to do it. If I don't find a window for this in the week-end, it might not be before two weeks or so. |
|
That's fine. There is no rush :) |
|
here you are @ghiculescu, hopefully sending it directly in PR wasn't to bold here. Cheers. |
|
I think it is a really common case, to change data after or during a DB migration. In real projects, we will find different ways to deal with that problem. From "one shot rake task" to put this "modifying data" task in the migration himself. In later case, if some classes changing, the migration will not work (new developers in team). I would love to see some best practice examples in Migration Guides. And if I am right, there are some examples already under section 3.9 using-reversible and following?! So, maybe it is OK to write a small example at section 8 of Getting Started and add a link to the Migration Guides section 3.9? |
Hello,
In section 8 of Getting Started, users learn how to add a status attribute. By the end of the section, they should have this feature working well, including a count of public posts on the index page. However if the user played with the blog application and already created some posts, this count won't include these posts as values have not been set.
The reader should be informed of that and indicated a way to tackle this kind of issue, either by modifying the migration scripts or run a console and run something equivalent to:
The text was updated successfully, but these errors were encountered: