"Oh, I wish I could go back to that time." I think many people are dragging regrets at some point in their lives. I also have such regrets.
But life cannot be restored. Let's look at it now. Take a look at the people around you. Let's live desperately now with those people.
So life is irreversible, but programming is different. If you make a mistake, you can start over again. Lol
$ rails geneate controllar motipuyo
I created a controller named motipuyo, but when I wanted to make it absent
$ rails destroy controllar motipuyo
Will be deleted with.
The controller is the class teacher at school. By giving instructions to model and view, each class is put together and one school called application is established. For now, this is the image lol.
$ rails db:migrate
The above is a command to migrate the rails database (meaning to migrate, update newly), but if you want to cancel it,
$ rails db:rollback
$ rails db:migrate VERSION=0
You can delete it by using the command.
When you want to go back one "rollback" command above The command "VERSION = 0" below is used when you want to return to the initial state.
It's hard to understand now, You can go back to updating the database with "migrate" with "rollback", I understand that.
Recommended Posts