[RUBY] Learning output ~ 11/3 ~

How to get the generated code back

"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

controller

$ 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.

Database

$ 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

Learning output ~ 11/3 ~
Learning output
[Test code learning / output]
Summary of 2020 programming learning output
Java learning (0)
Ruby learning 4
Ruby learning 5
Servlet learning
Ruby learning 3
2020/10/4 Morning output
2020/10/5 Morning output
Ruby learning 2
Maven learning
Ruby learning 6
2020/10/3 Noon output
Ruby learning 1
2020/10/3 Morning output
Output using methods and constants Learning memo
Programming learning day 3
[Java] output, variables
Ruby input / output
Ruby Learning # 25 Comments
Ruby Learning # 13 Arrays
Ruby Learning # 1 Introduction
Java learning day 5
Ruby Learning # 34 Modules
[ruby] drill output
[ruby] drill output
Ruby Learning # 14 Hashes
[ruby] drill output
Ruby standard output
Rails learning day 3
Rails learning day 4
[ruby] drill output
Ruby Learning # 33 Inheritance
[ruby] drill output
My learning record
Rails learning day 2
[ruby] drill output
[Output] About each
[ruby] drill output
Ruby Learning # 15 Methods
5th class: Output
rails learning day 1
java learning day 2
java learning day 1